- components
- ›
- progress linear
- ›
- react
Progress Linear
An indicator showing the progress or completion of a task.
50%
Color
Provide background color values for the track and range to customize the colors.
Height
Orientation
For vertical orieintation, a height must be defined on the Track component. The default is h-[100px].
Indeterminate
You must explicitely specify a null value to trigger indeterminate mode.
Custom Animation
Consider using following variants to target the orientation and state.
data-[orientation=horizontal]:my-custom-animation- target the horizontal orientation.data-[orientation=vertical]:my-custom-animation- target the vertical orientation.data-[state=indeterminate]:my-custom-animation- target the indeterminate state.
Native Alternative
The native progress element is available cross browser, but does not support indeterminate animations.
Direction
Label
API Reference
Root
| Property | Default | Type |
|---|---|---|
ids | - | Partial<{ root: string; track: string; label: string; circle: string; }> | undefined The ids of the elements in the progress bar. Useful for composition. |
value | - | number | null | undefinedThe controlled value of the progress bar. |
defaultValue | 50 | number | null | undefinedThe initial value of the progress bar when rendered. Use when you don't need to control the value of the progress bar. |
min | 0 | number | undefinedThe minimum allowed value of the progress bar. |
max | 100 | number | undefinedThe maximum allowed value of the progress bar. |
translations | - | IntlTranslations | undefinedThe localized messages to use. |
onValueChange | - | ((details: ValueChangeDetails) => void) | undefinedCallback fired when the value changes. |
formatOptions | { style: "percent" } | NumberFormatOptions | undefinedThe options to use for formatting the value. |
locale | "en-US" | string | undefinedThe locale to use for formatting the value. |
dir | "ltr" | "ltr" | "rtl" | undefinedThe document's text/writing direction. |
getRootNode | - | (() => ShadowRoot | Node | Document) | undefinedA root node to correctly resolve document in custom environments. E.x.: Iframes, Electron. |
orientation | "horizontal" | "horizontal" | "vertical" | undefinedThe orientation of the element. |
element | - | ((attributes: HTMLAttributes<"div">) => Element) | undefinedRender the element yourself |
RootProvider
| Property | Default | Type |
|---|---|---|
value | - | ProgressApi<PropTypes> |
element | - | ((attributes: HTMLAttributes<"div">) => Element) | undefinedRender the element yourself |
RootContext
| Property | Default | Type |
|---|---|---|
children | - | (progress: ProgressApi<PropTypes>) => ReactNode |
Label
| Property | Default | Type |
|---|---|---|
element | - | ((attributes: HTMLAttributes<"div">) => Element) | undefinedRender the element yourself |
ValueText
| Property | Default | Type |
|---|---|---|
element | - | ((attributes: HTMLAttributes<"span">) => Element) | undefinedRender the element yourself |
Track
| Property | Default | Type |
|---|---|---|
element | - | ((attributes: HTMLAttributes<"div">) => Element) | undefinedRender the element yourself |
Range
| Property | Default | Type |
|---|---|---|
element | - | ((attributes: HTMLAttributes<"div">) => Element) | undefinedRender the element yourself |
Circle
| Property | Default | Type |
|---|---|---|
element | - | ((attributes: HTMLAttributes<"svg">) => Element) | undefinedRender the element yourself |
CircleTrack
| Property | Default | Type |
|---|---|---|
element | - | ((attributes: HTMLAttributes<"circle">) => Element) | undefinedRender the element yourself |
CircleRange
| Property | Default | Type |
|---|---|---|
element | - | ((attributes: HTMLAttributes<"circle">) => Element) | undefinedRender the element yourself |