CircularProgress
Progress indicators are used to display a loading state or visualize the progress of an operation.
- Useful links:
import * as React from "react";import CircularProgress from "@mui/material/CircularProgress";import Typography from "@mui/material/Typography";
export default () => { const labelId = React.useId();
return ( <> <CircularProgress aria-labelledby={labelId} /> <Typography id={labelId}>Analyzing resultsā¦</Typography> </> );};StrataKit MUI modifications
Section titled āStrataKit MUI modificationsā- The
colorprop does not support"inherit"or"info". - The
disableShrink,enableTrackSlot, andthicknessprops are not supported. - Restyled using StrataKitās visual language.
- Includes full
forced-colorssupport.
Examples
Section titled āExamplesā- Primary: The default. Use when indicating the primary loading state on a page.
- Secondary: Use when indicating a secondary loading state or when multiple loading states are shown at once.
import * as React from "react";import CircularProgress from "@mui/material/CircularProgress";import Typography from "@mui/material/Typography";
export default () => { const labelId = React.useId();
return ( <> <CircularProgress color="secondary" aria-labelledby={labelId} /> <Typography id={labelId}>Analyzing resultsā¦</Typography> </> );};Determinate
Section titled āDeterminateāSet the variant prop to "determinate" when the completion percentage is known.
import * as React from "react";import Box from "@mui/material/Box";import CircularProgress from "@mui/material/CircularProgress";import Typography from "@mui/material/Typography";
import styles from "./CircularProgress.determinate.module.css";
export default () => { const labelId = React.useId(); const progress = 50;
return ( <> <Box className={styles.container}> <CircularProgress variant="determinate" value={progress} aria-labelledby={labelId} /> <Typography variant="caption" className={styles.percentage}> {progress}% </Typography> </Box> <Typography id={labelId}>Uploadingā¦</Typography> </> );};