Progress
Progress indicators inform users about the status of ongoing processes, such as loading an app, submitting a form, or saving updates.Overview
Material UI provides two types of progress indicators:- CircularProgress - Circular spinners
- LinearProgress - Horizontal progress bars
CircularProgress
Basic Usage
Determinate Progress
Show specific progress value:CircularProgress Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'determinate' | 'indeterminate' | 'indeterminate' | The variant to use. Use indeterminate when there is no progress value. |
value | number | 0 | The value of the progress indicator for determinate variant. Value between 0 and 100. |
size | number | string | 40 | The size of the component. If using a number, pixel unit is assumed. |
thickness | number | 3.6 | The thickness of the circle. |
color | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'inherit' | 'primary' | The color of the component. |
disableShrink | boolean | false | If true, the shrink animation is disabled (indeterminate only). |
enableTrackSlot | boolean | false | If true, a track circle slot is mounted to show a subtle background. |
sx | SxProps<Theme> | - | System prop for defining CSS overrides. |
Color Variants
Custom Size
LinearProgress
Basic Usage
Determinate Progress
Buffer Variant
Show both value and buffer progress:LinearProgress Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'determinate' | 'indeterminate' | 'buffer' | 'query' | 'indeterminate' | The variant to use. Use indeterminate or query when there is no progress value. |
value | number | - | The value of progress indicator for determinate and buffer variants. Value between 0 and 100. |
valueBuffer | number | - | The value for the buffer variant. Value between 0 and 100. |
color | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'inherit' | 'primary' | The color of the component. |
sx | SxProps<Theme> | - | System prop for defining CSS overrides. |
ARIA
If the progress bar is describing the loading progress of a particular region of a page, you should usearia-describedby to point to the progress bar, and set the aria-busy attribute to true on that region until it has finished loading.
CSS Classes
CircularProgress Classes
.MuiCircularProgress-root- Root element.MuiCircularProgress-svg- SVG element.MuiCircularProgress-circle- Circle element.MuiCircularProgress-circleDeterminate- Circle when variant=‘determinate’.MuiCircularProgress-circleIndeterminate- Circle when variant=‘indeterminate’.MuiCircularProgress-colorPrimary- Applied for primary color.MuiCircularProgress-colorSecondary- Applied for secondary color
LinearProgress Classes
.MuiLinearProgress-root- Root element.MuiLinearProgress-bar- Bar element.MuiLinearProgress-barColorPrimary- Bar with primary color.MuiLinearProgress-barColorSecondary- Bar with secondary color.MuiLinearProgress-bar1Determinate- Primary bar for determinate.MuiLinearProgress-bar1Indeterminate- Primary bar for indeterminate.MuiLinearProgress-bar1Buffer- Primary bar for buffer.MuiLinearProgress-bar2Buffer- Secondary bar for buffer.MuiLinearProgress-dashed- Dashed element for buffer variant
API Reference
For complete API documentation, see:Source Locations
~/workspace/source/packages/mui-material/src/CircularProgress/CircularProgress.d.ts:90~/workspace/source/packages/mui-material/src/LinearProgress/LinearProgress.d.ts:73