Back to Chakra Ui

Progress

apps/www/content/docs/components/progress.mdx

0.3.0-beta1.7 KB
Original Source
<ExampleTabs name="progress-basic" />

Usage

tsx
import { Progress } from "@chakra-ui/react"
tsx
<Progress.Root>
  <Progress.Track>
    <Progress.Range />
  </Progress.Track>
  <Progress.Label />
  <Progress.ValueText />
</Progress.Root>

Examples

Sizes

Use the size prop to change the size of the progress bar.

<ExampleTabs name="progress-with-sizes" />

Variants

Use the variant prop to change the visual style of the progress bar.

<ExampleTabs name="progress-with-variants" />

Colors

Use the colorPalette prop to change the color of the progress bar.

<ExampleTabs name="progress-with-colors" />

Inline Label

Compose the Progress.Label and Progress.ValueText components to create an inline label for the progress bar.

<ExampleTabs name="progress-with-inline-label" />

Info tip

Use the info prop to add a tooltip to the progress bar.

<ExampleTabs name="progress-with-label-info" />

Indeterminate

Set the value to null to show an indeterminate progress bar.

<ExampleTabs name="progress-indeterminate" />

Stripes

Set the striped prop to true to add stripes to the progress bar.

<ExampleTabs name="progress-with-stripes" />

Animated Stripes

Set the animated prop to true to animate the stripes.

<ExampleTabs name="progress-with-animated-stripes" />

Closed Component

Here's how to create a closed component using the Progress component.

<ExampleCode name="progress-closed-component" />

Props

Root

<PropTable component="Progress" part="Root" />

Explorer

Explore the Progress component parts interactively. Click on parts in the sidebar to highlight them in the preview.

<Explorer name="progress-explorer-demo" />