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.

Component 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.

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 classes

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

.MuiLinearProgress-bar

Styles applied to the layered bar1 and bar2 elements.

Rule name:bar


.MuiLinearProgress-bar1Buffer

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

Rule name:bar1Buffer


.MuiLinearProgress-bar1Determinate

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

Rule name:bar1Determinate


.MuiLinearProgress-bar1Indeterminate

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

Rule name:bar1Indeterminate


.MuiLinearProgress-bar2Buffer

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

Rule name:bar2Buffer


.MuiLinearProgress-bar2Indeterminate

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

Rule name:bar2Indeterminate


.MuiLinearProgress-barColorPrimary

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

Rule name:barColorPrimary


.MuiLinearProgress-barColorSecondary

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

Rule name:barColorSecondary


.MuiLinearProgress-buffer

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

Rule name:buffer


.MuiLinearProgress-colorPrimary

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

Rule name:colorPrimary


.MuiLinearProgress-colorSecondary

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

Rule name:colorSecondary


.MuiLinearProgress-dashed

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

Rule name:dashed


.MuiLinearProgress-dashedColorPrimary

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

Rule name:dashedColorPrimary


.MuiLinearProgress-dashedColorSecondary

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

Rule name:dashedColorSecondary


.MuiLinearProgress-determinate

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

Rule name:determinate


.MuiLinearProgress-indeterminate

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

Rule name:indeterminate


.MuiLinearProgress-query

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

Rule name:query


.MuiLinearProgress-root

Styles applied to the root element.

Rule name:root



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