Search documentation

Search the documentation and open a page.

Displays an indicator showing the completion progress of a task.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/progress

Composition

Progress ├── ProgressLabel (optional) ├── ProgressTrack │ └── ProgressRange ├── ProgressCircle (optional) │ ├── ProgressCircleTrack │ └── ProgressCircleRange ├── ProgressValueText (optional) └── ProgressView (optional)

Examples

Circle

Loading...

Controlled

Loading...

Default

Loading...

API Reference

Progress

PropTypeDefaultDescription
idstring | undefined—Unique identifier used to connect the component parts.
idsElementIds | undefined—Overrides generated identifiers for individual parts.
valuenumber | null | undefined—Current value when the component is controlled.
defaultValuenumber | null | undefined—Initial value when the component is uncontrolled.
minnumber | undefined0Sets the minimum value.
maxnumber | undefined100Sets the maximum value.
variant"default" | "dashed""default"Selects the standard compound track or generated dashed track.
segmentsnumber | undefined10Sets the number of pieces rendered by the dashed variant.
translationsIntlTranslations | undefined—Configures translations.
onValueChange((details: ValueChangeDetails) => void) | undefined—Runs when value changes.
formatOptionsIntl.NumberFormatOptions | undefined—Configures format options.
localestring | undefined—Configures locale.

Context, Hooks, and Types

ExportAPI
ProgressContextRender-prop component that exposes component state and actions.
ProgressRootProviderProvides an externally created API to the component tree.
useProgressCreates or accesses the component API.
useProgressContextReturns the nearest component API.
ProgressValueChangeDetailsType for the details object passed to the matching change callback.