Circular Progress

Circular Progress is used to indicates the progress for determinate and indeterminate processes.

  • Determinate progress: fills the circular track with color, as the indicator moves from 0 to 360 degrees.
  • Indeterminate progress: grows and shrinks the indicator while moving along the circular track.

Import#

Usage#

Editable Example

Changing the size#

You can add size prop to the progressbar to add a custom size.

Editable Example

Changing the thickness#

You can add the thickness prop to update the thickness of the progress ring.

The thickness has to be a ratio of the size. Value should be between 0 and 1.

Editable Example

Changing the color#

You can add color prop to any progressbar to apply any color that exists in the theme.

Editable Example

Adding label#

Chakra exports a CircularProgressLabel to help you add a label. Pass this component as children and you'll be able to render the value.

40%
Editable Example

Indeterminate Progress#

Setting the progress to indeterminate means you're not able to determine the value upfront. Pass the isIndeterminate prop to activate this state.

Editable Example

Accessibility#

  • Progress has role set to progressbar to denote that it's a progress bar
  • Progress has aria-valuenow set to the percentage completion value passed to the component, to ensure the progress percent is visible to screen readers.

Props#

NameTypeDefaultDescription
sizestring48pxThe size of the circular progress in CSS units
maxnumber100Maximum value defining 100% progress made (must be higher than 'min')
minnumber0Minimum value defining 'no progress' (must be lower than 'max')
valuenumberCurrent progress (must be between min/max)
isIndeterminatebooleanPuts the component into indeterminate state. When passed, the 'value' prop is ignored
thicknessstring or number10pxThe thickness of progress indicator
anglenumber0Angle to rotate progress indicator by
capIsRoundbooleanIf true, the cap of the progress indicator will be rounded
childrenReact.ReactNodeThe content of the circular progress bar. If passed, the content will be inside and centered in the progress bar
trackColorstringgrayThe color name of the progress track. Use a color key in the theme object
colorstringblueThe color of the progress indicator. Use a color key in the theme object
Edit this page

Made byChakraandRock Content