Skip to content

LinearProgress API

API reference docs for the React LinearProgress component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import LinearProgress from '@mui/material/LinearProgress';
// or
import { LinearProgress } from '@mui/material';

Learn about the difference by reading this guide on minimizing bundle size.



ARIA

If the progress bar is describing the loading progress of a particular region of a page, you should use aria-describedby to point to the progress bar, and set the aria-busy attribute to true on that region until it has finished loading.

Props

Props of the native component are also available.

NameTypeDefaultDescription
classesobject-

Override or extend the styles applied to the component.

See CSS classes API below for more details.

color'inherit'
| 'primary'
| 'secondary'
| string
'primary'

The color of the component. It supports both default and custom theme colors, which can be added as shown in the palette customization guide.

sxArray<func
| object
| bool>
| func
| object
-

The system prop that allows defining system overrides as well as additional CSS styles.

See the `sx` page for more details.

valuenumber-

The value of the progress indicator for the determinate and buffer variants. Value between 0 and 100.

valueBuffernumber-

The value for the buffer variant. Value between 0 and 100.

variant'buffer'
| 'determinate'
| 'indeterminate'
| 'query'
'indeterminate'

The variant to use. Use indeterminate or query when there is no progress value.

The ref is forwarded to the root element.

Theme default props

You can use MuiLinearProgress to change the default props of this component with the theme.


CSS classes

These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.

Class nameRule nameDescription
.MuiLinearProgress-barbarStyles applied to the layered bar1 and bar2 elements.
.MuiLinearProgress-bar1Bufferbar1BufferStyles applied to the bar1 element if variant="buffer".
.MuiLinearProgress-bar1Determinatebar1DeterminateStyles applied to the bar1 element if variant="determinate".
.MuiLinearProgress-bar1Indeterminatebar1IndeterminateStyles applied to the bar1 element if variant="indeterminate or query".
.MuiLinearProgress-bar2Bufferbar2BufferStyles applied to the bar2 element if variant="buffer".
.MuiLinearProgress-bar2Indeterminatebar2IndeterminateStyles applied to the bar2 element if variant="indeterminate or query".
.MuiLinearProgress-barColorPrimarybarColorPrimaryStyles applied to the bar elements if color="primary"; bar2 if variant not "buffer".
.MuiLinearProgress-barColorSecondarybarColorSecondaryStyles applied to the bar elements if color="secondary"; bar2 if variant not "buffer".
.MuiLinearProgress-bufferbufferStyles applied to the root element if variant="buffer".
.MuiLinearProgress-colorPrimarycolorPrimaryStyles applied to the root and bar2 element if color="primary"; bar2 if variant="buffer".
.MuiLinearProgress-colorSecondarycolorSecondaryStyles applied to the root and bar2 elements if color="secondary"; bar2 if variant="buffer".
.MuiLinearProgress-dasheddashedStyles applied to the additional bar element if variant="buffer".
.MuiLinearProgress-dashedColorPrimarydashedColorPrimaryStyles applied to the additional bar element if variant="buffer" and color="primary".
.MuiLinearProgress-dashedColorSecondarydashedColorSecondaryStyles applied to the additional bar element if variant="buffer" and color="secondary".
.MuiLinearProgress-determinatedeterminateStyles applied to the root element if variant="determinate".
.MuiLinearProgress-indeterminateindeterminateStyles applied to the root element if variant="indeterminate".
.MuiLinearProgress-queryqueryStyles applied to the root element if variant="query".
.MuiLinearProgress-rootrootStyles applied to the root element.

You can override the style of the component using one of these customization options: