CircularProgress API
API reference docs for the React CircularProgress component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import CircularProgress from '@mui/material/CircularProgress';
// or
import { CircularProgress } 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 of the native component are also available.
Name | Type | Default | Description |
---|---|---|---|
classes | object | - | Override or extend the styles applied to the component. See CSS classes API below for more details. |
color | 'inherit' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 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. |
disableShrink | bool | false | If |
size | number | string | 40 | The size of the component. If using a number, the pixel unit is assumed. If using a string, you need to provide the CSS unit, for example '3rem'. |
sx | Array<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. |
thickness | number | 3.6 | The thickness of the circle. |
value | number | 0 | The value of the progress indicator for the determinate variant. Value between 0 and 100. |
variant | 'determinate' | 'indeterminate' | 'indeterminate' | The variant to use. Use indeterminate when there is no progress value. |
ref
is forwarded to the root element.Theme default props
You can use MuiCircularProgress
to change the default props of this component with the theme.
These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
Class name | Rule name | Description |
---|---|---|
.MuiCircularProgress-circle | circle | Styles applied to the circle svg path. |
.MuiCircularProgress-circleDeterminate | circleDeterminate | Styles applied to the circle svg path if variant="determinate" . |
.MuiCircularProgress-circleDisableShrink | circleDisableShrink | Styles applied to the circle svg path if disableShrink={true} . |
.MuiCircularProgress-circleIndeterminate | circleIndeterminate | Styles applied to the circle svg path if variant="indeterminate" . |
.MuiCircularProgress-colorPrimary | colorPrimary | Styles applied to the root element if color="primary" . |
.MuiCircularProgress-colorSecondary | colorSecondary | Styles applied to the root element if color="secondary" . |
.MuiCircularProgress-determinate | determinate | Styles applied to the root element if variant="determinate" . |
.MuiCircularProgress-indeterminate | indeterminate | Styles applied to the root element if variant="indeterminate" . |
.MuiCircularProgress-root | root | Styles applied to the root element. |
.MuiCircularProgress-svg | svg | Styles applied to the svg element. |
You can override the style of the component using one of these customization options:
- With a global class name.
- With a rule name as part of the component's
styleOverrides
property in a custom theme.