Loading...
Installation
Install the following dependencies:
Copy and paste the following code into your project.
Loading...
Update the import paths to match your project setup.
Composition
Progress ├── ProgressLabel (optional) ├── ProgressTrack │ └── ProgressRange ├── ProgressCircle (optional) │ ├── ProgressCircleTrack │ └── ProgressCircleRange ├── ProgressValueText (optional) └── ProgressView (optional)
Examples
Circle
Loading...
Controlled
Loading...
Default
Loading...
API Reference
Progress
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | undefined | — | Unique identifier used to connect the component parts. |
ids | ElementIds | undefined | — | Overrides generated identifiers for individual parts. |
value | number | null | undefined | — | Current value when the component is controlled. |
defaultValue | number | null | undefined | — | Initial value when the component is uncontrolled. |
min | number | undefined | 0 | Sets the minimum value. |
max | number | undefined | 100 | Sets the maximum value. |
variant | "default" | "dashed" | "default" | Selects the standard compound track or generated dashed track. |
segments | number | undefined | 10 | Sets the number of pieces rendered by the dashed variant. |
translations | IntlTranslations | undefined | — | Configures translations. |
onValueChange | ((details: ValueChangeDetails) => void) | undefined | — | Runs when value changes. |
formatOptions | Intl.NumberFormatOptions | undefined | — | Configures format options. |
locale | string | undefined | — | Configures locale. |
Context, Hooks, and Types
| Export | API |
|---|---|
ProgressContext | Render-prop component that exposes component state and actions. |
ProgressRootProvider | Provides an externally created API to the component tree. |
useProgress | Creates or accesses the component API. |
useProgressContext | Returns the nearest component API. |
ProgressValueChangeDetails | Type for the details object passed to the matching change callback. |
Angular
React
Solid
Svelte
Vue