structyl

Progress API

View component

The full prop reference for the Progress component. Displays an indicator showing the completion progress of a task.

Import

tsx
import { Progress } from '@structyl/styled';

Props

Progress

Root progress bar component with styled variants; wraps Progress.Root from primitives and renders the indicator inside

PropTypeDefault
value#number | null

Current progress value (0 to max). Pass `null` or `undefined` for indeterminate state. Defaults to null.

max#number

Maximum value for the progress bar. Defaults to 100.

getValueLabel#(value: number, max: number) => string

Custom function to return localized label announced by screen readers. Defaults to percentage format.

size#'xs' | 'sm' | 'md' | 'lg' | 'xl'

Track height variant; xs=h-1, sm=h-1.5, md=h-2, lg=h-3, xl=h-4

'md'
color#'primary' | 'success' | 'warning' | 'destructive' | 'error' | 'info' | 'secondary'

Color of the progress indicator fill

'primary'
striped#boolean

Add diagonal stripe pattern to the indicator

false
animated#boolean

Animate the stripes moving left to right; works with or without striped=true

false
indeterminate#boolean

Override value with indeterminate animated state (1/3 width pulsing)

false
showLabel#boolean

Display percentage text centered inside the bar (useful for larger sizes)

false
indicatorClassName#string

Additional CSS classes to apply to the inner indicator element

className#string

Additional CSS classes to apply to the track container

asChild#boolean

Render as a child of another component (from Primitive)

Source code

If you didn't find what you need here, read the component implementation .

structyl — Accessible React Component Library