Progress

How far a task has got, with its label and value over the track, turning to the live accent when done and pulsing when it can't say.

01Preview

01
Full screen
Uploading report.pdf
x
Indexing the workspace
x

02Installation

npx shadcn@latest add https://aiellie.app/r/progress.json

03API reference

05
From the Base UI documentation

Groups all parts of the progress bar and provides the task completion status to screen readers. Renders a <div> element.

Props

PropTypeDefaultDescription
value\*number | null-The current value. The component is indeterminate when value is null.
aria-valuetextstring-A string value that provides a user-friendly name for aria-valuenow, the current value of the progress bar.
getAriaValueText((formattedValue: string, value: number | null) => string)-Accepts a function which returns a string value that provides a human-readable text alternative for the current value of the progress bar.
localeIntl.LocalesArgument-The locale used by Intl.NumberFormat when formatting the value. Defaults to the user's runtime locale.
minnumber0The minimum value.
maxnumber100The maximum value.
formatIntl.NumberFormatOptions-Options to format the value.
classNamestring | ((state: Progress.Root.State) => string | undefined)-CSS class applied to the element, or a function that returns a class based on the component's state.
styleReact.CSSProperties | ((state: Progress.Root.State) => React.CSSProperties | undefined)-Style applied to the element, or a function that returns a style object based on the component's state.
renderReactElement | ((props: HTMLProps, state: Progress.Root.State) => ReactElement)-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Data Attributes

AttributeTypeDescription
data-complete-Present when the progress has completed.
data-indeterminate-Present when the progress is in indeterminate state.
data-progressing-Present while the progress is progressing.