UNPKG

2.07 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { OverridableStringUnion } from '@mui/types';
4import { InternalStandardProps as StandardProps, Theme } from '..';
5import { LinearProgressClasses } from './linearProgressClasses';
6
7export interface LinearProgressPropsColorOverrides {}
8
9export interface LinearProgressProps
10 extends StandardProps<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
11 /**
12 * Override or extend the styles applied to the component.
13 */
14 classes?: Partial<LinearProgressClasses>;
15 /**
16 * The color of the component.
17 * It supports both default and custom theme colors, which can be added as shown in the
18 * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
19 * @default 'primary'
20 */
21 color?: OverridableStringUnion<
22 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'inherit',
23 LinearProgressPropsColorOverrides
24 >;
25 /**
26 * The system prop that allows defining system overrides as well as additional CSS styles.
27 */
28 sx?: SxProps<Theme>;
29 /**
30 * The value of the progress indicator for the determinate and buffer variants.
31 * Value between 0 and 100.
32 */
33 value?: number;
34 /**
35 * The value for the buffer variant.
36 * Value between 0 and 100.
37 */
38 valueBuffer?: number;
39 /**
40 * The variant to use.
41 * Use indeterminate or query when there is no progress value.
42 * @default 'indeterminate'
43 */
44 variant?: 'determinate' | 'indeterminate' | 'buffer' | 'query';
45}
46
47/**
48 * ## ARIA
49 *
50 * If the progress bar is describing the loading progress of a particular region of a page,
51 * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`
52 * attribute to `true` on that region until it has finished loading.
53 *
54 * Demos:
55 *
56 * - [Progress](https://mui.com/material-ui/react-progress/)
57 *
58 * API:
59 *
60 * - [LinearProgress API](https://mui.com/material-ui/api/linear-progress/)
61 */
62export default function LinearProgress(props: LinearProgressProps): React.JSX.Element;