Progress indicators show the status of an ongoing process, such as loading an app, submitting a form or saving updates.
- Determinate indicators show known progress, and fill from 0% to 100%.
- Indeterminate indicators show that a process is happening while the wait time is unknown.
When several items are loading, use a single progress indicator for the group. For a short wait, between 200ms and 5s, prefer a loading indicator.
A progress indicator comes as one of two components:
| Part | Use |
|---|---|
LinearProgressIndicator | A bar, as wide as its container. Place it on the edge of a container. |
CircularProgressIndicator | A ring, in an inline box of its size. Center it in an element. |
import { CircularProgressIndicator, LinearProgressIndicator } from '@material-web/react'Basic progress indicator
Use a LinearProgressIndicator or a CircularProgressIndicator to show the progress of a process, and name it with an aria-label.
import { CircularProgressIndicator, LinearProgressIndicator } from '@material-web/react'
export default function Basic() {
return (
<div className="flex w-80 flex-col items-center gap-space-400">
<LinearProgressIndicator aria-label="Loading news article" value={40} />
<CircularProgressIndicator aria-label="Refreshing page" shape="wavy" isIndeterminate />
</div>
)
}An indicator is determinate unless isIndeterminate is set, and its value is 0 by default.
Label
Children are rendered inside the indicator. To show the value in the ring of a circular indicator, pass a function as children and center the text it returns over the indicator, as with absolute inset-0 in this example. The function receives percentage, valueText and isIndeterminate. See Children as a function.
import { CircularProgressIndicator } from '@material-web/react'
export default function ValueText() {
return (
<>
<CircularProgressIndicator aria-label="Storage used" size={96} value={72}>
{({ valueText }) => (
<span className="absolute inset-0 grid place-items-center text-label-lg">
{valueText}
</span>
)}
</CircularProgressIndicator>
<CircularProgressIndicator
aria-label="Uploading photos"
size={96}
value={3}
maxValue={8}
valueLabel="3 of 8"
>
{({ valueText }) => (
<span className="absolute inset-0 grid place-items-center text-label-lg">
{valueText}
</span>
)}
</CircularProgressIndicator>
</>
)
}To show a label or the value beside a linear indicator, write them next to it, and name the indicator by its visible label with aria-labelledby. A linear indicator is as wide as its container, so in a row, put it in an element that takes the room that is left.
import { LinearProgressIndicator } from '@material-web/react'
import { useId } from 'react'
export default function LinearWithLabel() {
const id = useId()
const value = 40
return (
<div className="flex w-full max-w-96 flex-col gap-space-100">
<span id={id} className="text-label-lg">
Downloading update
</span>
<div className="flex items-center gap-space-200">
<div className="min-w-0 flex-1">
<LinearProgressIndicator aria-labelledby={id} value={value} />
</div>
<span className="text-label-lg text-on-surface-variant">{value}%</span>
</div>
</div>
)
}Value text
valueText is the text that the indicator reports for its value. An indicator reports its value to assistive technology as a percentage, such as 40%. Where the progress is not a percentage, set valueLabel to the text to report, or set formatOptions to format the value as another kind of number, as with React Aria's ProgressBar. A circular indicator takes both props too.
import { LinearProgressIndicator } from '@material-web/react'
export default function LinearValueText() {
return (
<div className="flex w-full max-w-96 flex-col gap-space-400">
<LinearProgressIndicator
aria-label="Uploading photos"
value={3}
maxValue={8}
valueLabel="3 of 8 photos"
/>
<LinearProgressIndicator
aria-label="Downloading update"
value={12}
maxValue={20}
formatOptions={{ style: 'unit', unit: 'megabyte' }}
/>
</div>
)
}Determinate
Set value to the progress made. A determinate indicator must accurately represent the progress of what it measures.
import { Button, CircularProgressIndicator } from '@material-web/react'
import { useState } from 'react'
export default function CircularDeterminate() {
const [value, setValue] = useState(40)
return (
<div className="flex flex-col items-center gap-space-300">
<CircularProgressIndicator aria-label="Installing update" value={value} />
<Button variant="tonal" onPress={() => setValue(value >= 100 ? 0 : value + 20)}>
{value >= 100 ? 'Start over' : 'Add 20%'}
</Button>
</div>
)
}import { Button, LinearProgressIndicator } from '@material-web/react'
import { useState } from 'react'
export default function LinearDeterminate() {
const [value, setValue] = useState(40)
return (
<div className="flex w-full max-w-96 flex-col items-center gap-space-300">
<LinearProgressIndicator aria-label="Downloading update" value={value} />
<Button variant="tonal" onPress={() => setValue(value >= 100 ? 0 : value + 20)}>
{value >= 100 ? 'Start over' : 'Add 20%'}
</Button>
</div>
)
}Custom scale
A value is kept between minValue and maxValue, which are 0 and 100 by default. Set them to measure the progress on another scale. The indicator fills by the share of the range that the value has reached: step 2 of 5 fills 40% of the ring. A linear indicator takes minValue and maxValue too.
import { CircularProgressIndicator } from '@material-web/react'
export default function CircularCustomScale() {
return (
<>
<CircularProgressIndicator aria-label="Setting up, step 2 of 5" value={2} maxValue={5} />
<CircularProgressIndicator
aria-label="Preheating the oven"
value={110}
minValue={20}
maxValue={200}
/>
</>
)
}Indeterminate
Set isIndeterminate to show that a process is happening while the wait time is unknown.
import { CircularProgressIndicator } from '@material-web/react'
export default function CircularIndeterminate() {
return <CircularProgressIndicator aria-label="Refreshing page" isIndeterminate />
}import { LinearProgressIndicator } from '@material-web/react'
export default function LinearIndeterminate() {
return (
<div className="w-full max-w-96">
<LinearProgressIndicator aria-label="Loading news article" isIndeterminate />
</div>
)
}Indeterminate to determinate
As more about a process becomes known, change the indicator from indeterminate to determinate: clear isIndeterminate and set a value.
import { Button, CircularProgressIndicator, LinearProgressIndicator } from '@material-web/react'
import { useState } from 'react'
export default function ToDeterminate() {
const [isLoaded, setLoaded] = useState(false)
return (
<div className="flex w-full max-w-96 flex-col items-center gap-space-300">
<LinearProgressIndicator
aria-label="Loading episodes"
isIndeterminate={!isLoaded}
value={100}
/>
<CircularProgressIndicator
aria-label="Loading artwork"
isIndeterminate={!isLoaded}
value={100}
/>
<Button variant="tonal" onPress={() => setLoaded(!isLoaded)}>
{isLoaded ? 'Load again' : 'Finish loading'}
</Button>
</div>
)
}Color
The active indicator takes the text color, which is primary by default. To use another color role, pass its text color class in className. The track keeps its secondary-container color. On a linear indicator, the stop indicator takes the same color as the active indicator.
import { CircularProgressIndicator } from '@material-web/react'
export default function CircularColor() {
return (
<>
<CircularProgressIndicator
aria-label="Loading, secondary"
isIndeterminate
className="text-secondary"
/>
<CircularProgressIndicator
aria-label="Loading, tertiary"
isIndeterminate
className="text-tertiary"
/>
<CircularProgressIndicator
aria-label="Loading, error"
isIndeterminate
className="text-error"
/>
</>
)
}import { LinearProgressIndicator } from '@material-web/react'
export default function LinearColor() {
return (
<div className="flex w-full max-w-96 flex-col gap-space-400">
<LinearProgressIndicator
aria-label="Loading, secondary"
isIndeterminate
className="text-secondary"
/>
<LinearProgressIndicator
aria-label="Loading, tertiary"
isIndeterminate
className="text-tertiary"
/>
<LinearProgressIndicator aria-label="Loading, error" value={40} className="text-error" />
</div>
)
}Sizes
Set size on a circular indicator to its size in dp, from 24 to 240. A size outside the range is brought back to its nearest end. The stroke and the wave scale with the size.
Without size, a circular indicator is 48dp at the default thickness, and a thicker stroke adds to it.
import { CircularProgressIndicator } from '@material-web/react'
export default function Sizes() {
return (
<>
<CircularProgressIndicator aria-label="Loading, 24dp" shape="wavy" size={24} value={40} />
<CircularProgressIndicator aria-label="Loading, 48dp" shape="wavy" size={48} value={40} />
<CircularProgressIndicator aria-label="Loading, 96dp" shape="wavy" size={96} value={40} />
<CircularProgressIndicator aria-label="Loading, 240dp" shape="wavy" size={240} value={40} />
</>
)
}Shapes
Set shape to flat (the default) or wavy, which gives the active indicator a wave. The wavy shape can make a longer process feel less static, and suits a more expressive style.
A wavy linear indicator is as tall as its wave. On a wavy circular indicator, the crests of the wave reach past the indicator's size by the amplitude.
import { CircularProgressIndicator, LinearProgressIndicator } from '@material-web/react'
export default function Shapes() {
return (
<div className="flex w-full max-w-96 flex-col items-center gap-space-400">
<LinearProgressIndicator aria-label="Loading, flat" shape="flat" value={40} />
<LinearProgressIndicator aria-label="Loading, wavy" shape="wavy" value={40} />
<LinearProgressIndicator aria-label="Loading, wavy" shape="wavy" isIndeterminate />
<div className="flex gap-space-400">
<CircularProgressIndicator aria-label="Refreshing, flat" shape="flat" value={40} />
<CircularProgressIndicator aria-label="Refreshing, wavy" shape="wavy" value={40} />
<CircularProgressIndicator aria-label="Refreshing, wavy" shape="wavy" isIndeterminate />
</div>
</div>
)
}On a determinate indicator, the wave shows while the progress is above 10% and below 95%. To change the wave, see Amplitude and wavelength.
Track and stop indicator
The track is the part of the ring or the bar that the active indicator has not reached. Set showTrack={false} to remove it, as in a button.
import { CircularProgressIndicator } from '@material-web/react'
export default function CircularTrack() {
return (
<>
<CircularProgressIndicator aria-label="Loading news article" value={40} />
<CircularProgressIndicator aria-label="Loading, no track" value={40} showTrack={false} />
<CircularProgressIndicator
aria-label="Refreshing, no track"
isIndeterminate
showTrack={false}
/>
</>
)
}A determinate linear indicator ends in a stop indicator. Set showStopIndicator={false} to remove it, only where the track has a contrast of at least 3:1 with the surfaces around it. An indeterminate or a circular indicator has no stop indicator.
import { LinearProgressIndicator } from '@material-web/react'
export default function StopAndTrack() {
return (
<div className="flex w-full max-w-96 flex-col gap-space-400">
<LinearProgressIndicator aria-label="Loading news article" value={40} />
<LinearProgressIndicator
aria-label="Loading, no stop indicator"
value={40}
showStopIndicator={false}
/>
<LinearProgressIndicator aria-label="Loading, no track" value={40} showTrack={false} />
</div>
)
}Placement
Place a linear indicator on the edge of a container, and center a circular one in an element. In this example, a linear indicator runs along the top edge of a container that is loading, inset 4dp from its sides.
import { LinearProgressIndicator } from '@material-web/react'
export default function OnContainer() {
return (
<div className="w-full max-w-96 rounded-shape-lg bg-surface-container-highest">
<div className="px-space-50 pt-space-50">
<LinearProgressIndicator aria-label="Loading my episodes" shape="wavy" value={35} />
</div>
<div className="p-space-200 text-title-lg">My episodes</div>
</div>
)
}Right to left
In a right-to-left layout, a linear indicator fills from the right. A circular indicator still fills clockwise.
import { CircularProgressIndicator, LinearProgressIndicator } from '@material-web/react'
export default function RightToLeft() {
return (
<div dir="rtl" className="flex w-full max-w-96 items-center gap-space-400">
<LinearProgressIndicator aria-label="Loading news article" shape="wavy" value={40} />
<CircularProgressIndicator aria-label="Refreshing page" shape="wavy" value={40} />
</div>
)
}In a button
In a button, remove the track with showTrack={false} and give the indicator the label's color with className="text-current". In a very small button, use the flat shape, since the wave is not as visible at that size.
When the button's label already says what is happening, hide the indicator from assistive technology by wrapping it in an element with aria-hidden, and still give the indicator an aria-label.
Note: An aria-hidden set on the indicator itself is not applied.
import { Button, CircularProgressIndicator } from '@material-web/react'
export default function InButton() {
return (
<>
<Button>
<span aria-hidden className="flex">
<CircularProgressIndicator
aria-label="Saving"
isIndeterminate
size={24}
showTrack={false}
className="text-current"
/>
</span>
Saving
</Button>
<Button variant="outlined">
<span aria-hidden className="flex">
<CircularProgressIndicator
aria-label="Checking for updates"
isIndeterminate
size={24}
showTrack={false}
className="text-current"
/>
</span>
Checking for updates
</Button>
</>
)
}While the button's action is in progress, set its isPending instead: a pending button shows a loading indicator of its own, alone, and ignores presses. See Loading.
Delaying appearance
To keep an indicator from flashing on a process that ends at once, render it only after the process has run for a moment. In this example, the indicator appears after one second: stop the loading before that, and it is never shown.
import { Button, LinearProgressIndicator } from '@material-web/react'
import { useRef, useState } from 'react'
export default function Delay() {
const [status, setStatus] = useState<'idle' | 'loading' | 'slow'>('idle')
const timer = useRef<ReturnType<typeof setTimeout>>(undefined)
const start = () => {
setStatus('loading')
// The indicator appears once the process has run for a second.
timer.current = setTimeout(() => setStatus('slow'), 1000)
}
const stop = () => {
clearTimeout(timer.current)
setStatus('idle')
}
return (
<div className="flex w-full max-w-96 flex-col items-center gap-space-300">
<div className="h-space-50 w-full">
{status === 'slow' && (
<LinearProgressIndicator aria-label="Loading results" isIndeterminate />
)}
</div>
<Button variant="tonal" onPress={status === 'idle' ? start : stop}>
{status === 'idle' ? 'Start loading' : 'Stop loading'}
</Button>
</div>
)
}Customization
Pass classes in className to restyle one indicator. A class of yours replaces the indicator's own class for the same property. See Styling for the classes and the theme.
- Width: A linear indicator is as wide as its container. Pass a width class, such as
w-48, to set its width. - Color: Pass a text color class for the active indicator, as in Color.
- Track color: The track is not reached by
className. To change its color, set thesecondary-containercolor role on the indicator. See Theme. - Functions:
children,classNameandstylecan be functions ofpercentage,valueTextandisIndeterminate. See Children as a function. - Every indicator: To restyle all the indicators at once, change the theme.
Thickness
Set thickness to the thickness of the stroke in dp. The default is 4.
import { CircularProgressIndicator, LinearProgressIndicator } from '@material-web/react'
export default function Thickness() {
return (
<div className="flex w-full max-w-96 flex-col items-center gap-space-400">
<LinearProgressIndicator aria-label="Loading, 4dp" value={40} />
<LinearProgressIndicator aria-label="Loading, 8dp" thickness={8} value={40} />
<LinearProgressIndicator
aria-label="Loading, 8dp, wavy"
thickness={8}
shape="wavy"
value={40}
/>
<div className="flex gap-space-400">
<CircularProgressIndicator aria-label="Refreshing, 4dp" value={40} />
<CircularProgressIndicator aria-label="Refreshing, 8dp" thickness={8} value={40} />
<CircularProgressIndicator
aria-label="Refreshing, 8dp, wavy"
thickness={8}
shape="wavy"
value={40}
/>
</div>
</div>
)
}Amplitude and wavelength
On a wavy indicator, set amplitude and wavelength in dp. The amplitude is measured from the center of the resting position to the center of the peak, and the wavelength between two adjacent peaks.
| Indicator | Amplitude | Wavelength |
|---|---|---|
| Linear, determinate | 3 | 40 |
| Linear, indeterminate | 3 | 20 |
| Circular | 1.6 | 15 |
These are the defaults. A wavelength shorter than 8dp, or shorter than the thickness, is raised to that length.
import { CircularProgressIndicator, LinearProgressIndicator } from '@material-web/react'
export default function Wave() {
return (
<div className="flex w-full max-w-96 flex-col items-center gap-space-400">
<LinearProgressIndicator aria-label="Loading" shape="wavy" value={60} />
<LinearProgressIndicator
aria-label="Loading, a taller and shorter wave"
shape="wavy"
amplitude={6}
wavelength={24}
value={60}
/>
<div className="flex gap-space-400">
<CircularProgressIndicator aria-label="Refreshing" shape="wavy" value={60} />
<CircularProgressIndicator
aria-label="Refreshing, a longer wave"
shape="wavy"
wavelength={30}
value={60}
/>
</div>
</div>
)
}Limitations
Hidden indicators
An indicator does not apply an aria-hidden of its own. To hide it from assistive technology, set aria-hidden on an element around it, as in a button.
Server rendering
A progress indicator is drawn by script. On a server-rendered page, a linear indicator stays empty and a circular one stands still until the page has hydrated. Where an indicator must move before that, use a loading indicator, which does not wait for the script.
Use cases
Material lists what people should be able to do with assistive technology:
- Navigate to the progress indicator
- Understand what progress the indicator is communicating
Interaction and style
- Color contrast: The active indicator and the stop indicator need 3:1 contrast with the surface behind them. Keep that contrast when you change their color. In a button, give the indicator the label's color and remove the track, as in a button.
- Stop indicator: Remove the stop indicator only where the track has at least 3:1 contrast with the surfaces around it, so that the end of the track stays easy to see. See Track and stop indicator.
- Motion: With reduced motion, a determinate indicator jumps to a new value, and an indeterminate one keeps moving.
- Forced colors: In forced colors, the active indicator and the stop indicator are drawn in the system's text color, and the track in its disabled text color.
- Right to left: A linear indicator fills from the right in a right-to-left layout. A circular indicator still fills clockwise.
Labeling elements
- An indicator has the
progressbarrole, and is not a tab stop. It reports its value as text,40%unlessformatOptionsorvalueLabelchange it. An indeterminate indicator reports no value. - Name the indicator with
aria-labeloraria-labelledby, or with aLabelfromreact-aria-componentsamong its children. As Material advises, include the process and the affected content in the label, such as Loading news article or Refreshing page. - To hide an indicator from assistive technology, set
aria-hiddenon an element around it.
LinearProgressIndicator
shape'flat' | 'wavy'Default'flat'The active indicator has two shape options: flat and wavy. Use the shape that best fits the product’s tone.
The wavy shape can make longer processes feel less static and is best used when a more expressive style is appropriate.
When using the wavy shape, the overall height of the component changes. At very small sizes, the wavy shape may not be as visible.
In very small buttons, use the flat shape since the wavy shape is not as visible at that size.
thicknessnumberDefault4Thickness: Default (4dp) and variable
The thicker variants are provided as sample measurement for makers to adjust the default version based on their use cases.
showTrackbooleanDefaulttrueWhen integrated into another component, such as a button, make sure that the active indicator provides visual contrast of at least 3:1 against the other component.
For the active indicator, use the same color as the label text or icon. The track should be removed.
amplitudenumberDefault3Wavy indicators use amplitude and wavelength to determine the shape of the wave. The height is the overall container height.
Amplitude measures from the center of the resting position to the center of the peak
wavelengthnumberDefault40, or 20 while indeterminateWavy indicators use amplitude and wavelength to determine the shape of the wave. The height is the overall container height.
Wavelength measures the distance between two adjacent peaks
showStopIndicatorbooleanDefaulttrueThe stop indicator is a 4dp circle that marks the end of a linear determinate progress indicator to meet Material's accessibility standards.
It's not used for indeterminate or circular progress indicators.
The stop indicator is required if the track has a contrast below 3:1 with its container or the surface behind the container.
Only remove the end stop indicator if there's a visual contrast of at least 3:1 with surrounding surfaces
Props of LinearProgressIndicator (17)
classNameClassNameOrFunction<ProgressBarRenderProps>Default'react-aria-ProgressBar'The CSS className for the element. A function may be provided to compute the class based on component state.
idstringThe element's unique identifier. See MDN.
aria-labelstringDefines a string value that labels the current element.
aria-labelledbystringIdentifies the element (or elements) that labels the current element.
aria-describedbystringIdentifies the element (or elements) that describes the object.
aria-detailsstringIdentifies the element (or elements) that provide a detailed, extended description for the object.
valuenumberDefault0The current value (controlled).
minValuenumberDefault0The smallest value allowed for the input.
maxValuenumberDefault100The largest value allowed for the input.
isIndeterminatebooleanWhether presentation is indeterminate when progress isn't known.
formatOptionsIntl.NumberFormatOptionsDefault{ style: 'percent' }The display format of the value label.
valueLabelReactNodeThe content to display as the value's label (e.g. 1 of 4).
childrenChildrenOrFunction<T>The children of the component. A function may be provided to alter the children based on component state.
styleCSSProperties | (values: ProgressBarRenderProps & { defaultStyle: CSSProperties; }) => CSSProperties | undefinedThe inline style for the element. A function may be provided to compute the style based on component state.
renderDOMRenderFunction<'div', ProgressBarRenderProps>Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components.
Requirements:
- You must render the expected element type (e.g. if
<button>is expected, you cannot render an<a>). - Only a single root DOM element can be rendered (no fragments).
- You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.
- You must render the expected element type (e.g. if
slotstring | nullA slot name for the component. Slots allow the component to receive props from a parent component. An explicit
nullvalue indicates that the local props completely override all props received from a parent.refRef<HTMLDivElement>
LinearProgressIndicator also takes the 70 attributes and events of the element it renders.
CircularProgressIndicator
shape'flat' | 'wavy'Default'flat'The active indicator has two shape options: flat and wavy. Use the shape that best fits the product’s tone.
The wavy shape can make longer processes feel less static and is best used when a more expressive style is appropriate.
When using the wavy shape, the overall height of the component changes. At very small sizes, the wavy shape may not be as visible.
In very small buttons, use the flat shape since the wavy shape is not as visible at that size.
thicknessnumberDefault4Thickness: Default (4dp) and variable
The thicker variants are provided as sample measurement for makers to adjust the default version based on their use cases.
showTrackbooleanDefaulttrueWhen integrated into another component, such as a button, make sure that the active indicator provides visual contrast of at least 3:1 against the other component.
For the active indicator, use the same color as the label text or icon. The track should be removed.
sizenumberDefault48Circular progress indicators have flexible sizes. They can range from 24dp to 240dp, depending on the placement and the breakpoint. Avoid exceeding the minimum and maximum sizes.
Reserve very large progress indicators for large and extra-large windows, such as desktop.
The waveform should scale with the size so the proportions look the same across sizes
amplitudenumberDefault1.6Wavy indicators use amplitude and wavelength to determine the shape of the wave. The height is the overall container height.
Amplitude measures from the center of the resting position to the center of the peak
wavelengthnumberDefault15Wavy indicators use amplitude and wavelength to determine the shape of the wave. The height is the overall container height.
Wavelength measures the distance between two adjacent peaks
Props of CircularProgressIndicator (17)
classNameClassNameOrFunction<ProgressBarRenderProps>Default'react-aria-ProgressBar'The CSS className for the element. A function may be provided to compute the class based on component state.
idstringThe element's unique identifier. See MDN.
aria-labelstringDefines a string value that labels the current element.
aria-labelledbystringIdentifies the element (or elements) that labels the current element.
aria-describedbystringIdentifies the element (or elements) that describes the object.
aria-detailsstringIdentifies the element (or elements) that provide a detailed, extended description for the object.
valuenumberDefault0The current value (controlled).
minValuenumberDefault0The smallest value allowed for the input.
maxValuenumberDefault100The largest value allowed for the input.
isIndeterminatebooleanWhether presentation is indeterminate when progress isn't known.
formatOptionsIntl.NumberFormatOptionsDefault{ style: 'percent' }The display format of the value label.
valueLabelReactNodeThe content to display as the value's label (e.g. 1 of 4).
childrenChildrenOrFunction<T>The children of the component. A function may be provided to alter the children based on component state.
styleCSSProperties | (values: ProgressBarRenderProps & { defaultStyle: CSSProperties; }) => CSSProperties | undefinedThe inline style for the element. A function may be provided to compute the style based on component state.
renderDOMRenderFunction<'div', ProgressBarRenderProps>Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components.
Requirements:
- You must render the expected element type (e.g. if
<button>is expected, you cannot render an<a>). - Only a single root DOM element can be rendered (no fragments).
- You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.
- You must render the expected element type (e.g. if
slotstring | nullA slot name for the component. Slots allow the component to receive props from a parent component. An explicit
nullvalue indicates that the local props completely override all props received from a parent.refRef<HTMLDivElement>
CircularProgressIndicator also takes the 70 attributes and events of the element it renders.