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

For examples and details on the usage of this React component, visit the component demo pages:

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.

classes

Override or extend the styles applied to the component.

See CSS API below for more details.

Type:

object

color

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

Type:

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

Default:

'primary'

sx

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

See the `sx` page for more details.

Type:

Array<func | object | bool> | func | object

value

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

Type:

number

valueBuffer

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

Type:

number

variant

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

Type:

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

Default:

'indeterminate'

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

The following class names are useful for styling with CSS (the state classes are marked).
To learn more, visit the component customization page.


.MuiLinearProgress-rootroot

Styles applied to the root element.


.MuiLinearProgress-colorPrimarycolorPrimary

Styles applied to the root and bar2 element if color="primary"; bar2 if variant="buffer".


.MuiLinearProgress-colorSecondarycolorSecondary

Styles applied to the root and bar2 elements if color="secondary"; bar2 if variant="buffer".


.MuiLinearProgress-determinatedeterminate

Styles applied to the root element if variant="determinate".


.MuiLinearProgress-indeterminateindeterminate

Styles applied to the root element if variant="indeterminate".


.MuiLinearProgress-bufferbuffer

Styles applied to the root element if variant="buffer".


.MuiLinearProgress-queryquery

Styles applied to the root element if variant="query".


.MuiLinearProgress-dasheddashed

Styles applied to the additional bar element if variant="buffer".


.MuiLinearProgress-dashedColorPrimarydashedColorPrimary

Styles applied to the additional bar element if variant="buffer" and color="primary".


.MuiLinearProgress-dashedColorSecondarydashedColorSecondary

Styles applied to the additional bar element if variant="buffer" and color="secondary".


.MuiLinearProgress-barbar

Styles applied to the layered bar1 and bar2 elements.


.MuiLinearProgress-barColorPrimarybarColorPrimary

Styles applied to the bar elements if color="primary"; bar2 if variant not "buffer".


.MuiLinearProgress-barColorSecondarybarColorSecondary

Styles applied to the bar elements if color="secondary"; bar2 if variant not "buffer".


.MuiLinearProgress-bar1Indeterminatebar1Indeterminate

Styles applied to the bar1 element if variant="indeterminate or query".


.MuiLinearProgress-bar1Determinatebar1Determinate

Styles applied to the bar1 element if variant="determinate".


.MuiLinearProgress-bar1Bufferbar1Buffer

Styles applied to the bar1 element if variant="buffer".


.MuiLinearProgress-bar2Indeterminatebar2Indeterminate

Styles applied to the bar2 element if variant="indeterminate or query".


.MuiLinearProgress-bar2Bufferbar2Buffer

Styles applied to the bar2 element if variant="buffer".


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