UNPKG

1.65 kBTypeScriptView Raw
1import * as React from 'react';
2import { StandardProps } from '..';
3
4export interface LinearProgressProps
5 extends StandardProps<React.HTMLAttributes<HTMLDivElement>, LinearProgressClassKey, 'children'> {
6 /**
7 * The color of the component. It supports those theme colors that make sense for this component.
8 */
9 color?: 'primary' | 'secondary';
10 /**
11 * The value of the progress indicator for the determinate and buffer variants.
12 * Value between 0 and 100.
13 */
14 value?: number;
15 /**
16 * The value for the buffer variant.
17 * Value between 0 and 100.
18 */
19 valueBuffer?: number;
20 /**
21 * The variant to use.
22 * Use indeterminate or query when there is no progress value.
23 */
24 variant?: 'determinate' | 'indeterminate' | 'buffer' | 'query';
25}
26
27export type LinearProgressClassKey =
28 | 'root'
29 | 'colorPrimary'
30 | 'colorSecondary'
31 | 'determinate'
32 | 'indeterminate'
33 | 'buffer'
34 | 'query'
35 | 'dashed'
36 | 'dashedColorPrimary'
37 | 'dashedColorSecondary'
38 | 'bar'
39 | 'barColorPrimary'
40 | 'barColorSecondary'
41 | 'bar1Indeterminate'
42 | 'bar2Indeterminate'
43 | 'bar1Determinate'
44 | 'bar1Buffer'
45 | 'bar2Buffer';
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 * Demos:
54 *
55 * - [Progress](https://mui.com/components/progress/)
56 *
57 * API:
58 *
59 * - [LinearProgress API](https://mui.com/api/linear-progress/)
60 */
61export default function LinearProgress(props: LinearProgressProps): JSX.Element;