Installation
Add Component
Copy the code snippet below into you components folder.
Integrate Recipe
Integrate this recipe in to your Panda config.
Usage
Examples
Sizes
Use the size prop to change the size of the progress bar.
Variants
Use the variant prop to change the visual style of the progress bar.
Colors
Use the colorPalette prop to change the color of the progress bar.
Inline Label
Compose the Progress.Label and Progress.ValueText components to create an inline label for the progress bar.
Indeterminate
Set the value to null to show an indeterminate progress bar.
Stripes
Set the striped prop to true to add stripes to the progress bar.
Animated Stripes
Set the animated prop to true to animate the stripes.
Closed Component
Here's how to setup the progress for a closed component composition.
Props
Root
| Prop | Default | Type | 
|---|---|---|
| variant | 'solid' | 'solid' | 'subtle' | 
| shape | 'rounded' | 'square' | 'rounded' | 'full' | 
| size | 'md' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 
| defaultValue | 50 | numberThe initial value of the progress bar when rendered. Use when you don't need to control the value of the progress bar. | 
| formatOptions | { style: \percent\ } | NumberFormatOptionsThe options to use for formatting the value. | 
| locale | \en-US\ | stringThe locale to use for formatting the value. | 
| max | 100 | numberThe maximum allowed value of the progress bar. | 
| min | 0 | numberThe minimum allowed value of the progress bar. | 
| orientation | \horizontal\ | 'horizontal' | 'vertical'The orientation of the element. | 
| striped | boolean | |
| animated | boolean | |
| asChild | booleanUse the provided child element as the default rendered element, combining their props and behavior. | |
| id | stringThe unique identifier of the machine. | |
| ids | Partial<{ root: string; track: string; label: string; circle: string }>The ids of the elements in the progress bar. Useful for composition. | |
| onValueChange | (details: ValueChangeDetails) => voidCallback fired when the value changes. | |
| translations | IntlTranslationsThe localized messages to use. | |
| value | numberThe controlled value of the progress bar. | 
View
| Prop | Default | Type | 
|---|---|---|
| state* | ProgressState | |
| asChild | booleanUse the provided child element as the default rendered element, combining their props and behavior. |