Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Progress

A progress bar built on the @zag-js/progress machine. The machine wires role="progressbar", the live value text, and the aria-value* range automatically, so they are correct by construction rather than hand-wired.

React Progresslive
import { Progress } from "@/components/ui/progress";
<Progress label="Guide setup" value={62} showValue />
<Progress value={null} /> {/* indeterminate */}
Terminal window
npx @glaceon/cli add progress --framework react # or svelte, solid
Element Data Attribute Value Description
root data-value number Current value. Omitted when indeterminate.
root data-state "indeterminate" | "loading" | "complete" Derived from value against max.
root data-max number The maximum value.
root data-orientation "horizontal" | "vertical" Layout axis.
track data-state "indeterminate" | "loading" | "complete" Matches the root state.
range data-state "indeterminate" | "loading" | "complete" Matches the root state.
Prop Type Default Description
value number | null undefined Current value. Pass null for the indeterminate state.
min number 0 Range minimum.
max number 100 Range maximum.
label string undefined Renders a visible label linked to the track.
showValue boolean false Renders the value text. Also exposed through an aria-live region.
class / className string undefined Extra classes, appended last.

role="progressbar" and aria-valuenow / aria-valuemin / aria-valuemax come from the machine. The value text node is aria-live="polite", so progress updates are announced without interrupting the user.