Default
A pencil-hatched box colored in with a marker as far as the value says. Change the value and the marker glides to it (a CSS clip on a full-length pass; nothing is redrawn).
A bar somebody hatched in pencil and is coloring in with a marker. The marker is one full-length pass revealed by a CSS clip up to the value, so changing the value is a transition, not a redraw. Without a value it becomes a scribble sliding across. Radix Progress underneath.
npx shadcn@latest add @wobko/progressFirst time here? Add the registry to components.json first. How to install
A pencil-hatched box colored in with a marker as far as the value says. Change the value and the marker glides to it (a CSS clip on a full-length pass; nothing is redrawn).
sm, default and lg; marker, highlighter, grass and sky inks. Without a value the bar is indeterminate: a marker scribble slides across (it holds still, mid-bar, with reduced motion).
A real-world use: three files at different speeds, an indeterminate bar while one is being checked, a green bar and a tick when it is done. Progress is announced through aria-valuenow; the percentage is text.
`max` sets the scale, so value and max can be a step and a step count. The label is the only text; the bar has the same value in aria-valuenow and aria-valuemax.
Official `progress-demo`: the bar starts at 13 and jumps to 66 half a second later. The marker is drawn once, full length, and revealed to the value, so the change is a CSS transition. Only addition: an `aria-label`, which a progressbar needs.
Radix Progress.Root (role=progressbar with aria-valuenow / min / max, data-state loading | complete | indeterminate) and its Indicator, both drawn hosts. The Indicator (data-slot="progress-indicator") is stretched over the whole bar and clipped to the value.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | null | - | How far along, out of `max`; clamped to 0..max (an upload that reports 100.4 is a full bar; Radix alone would call that invalid and start the waiting animation). Leave it out, pass null or NaN for an indeterminate bar (no aria-valuenow). |
| max | number | 100 | The scale: value 3 of max 5 is 60 %. |
| size | "sm" | "default" | "lg" | "default" | 12, 16 or 20 px tall. Any h-* class in `className` wins; the drawing follows the box. |
| tone | "marker" | "hi" | "green" | "blue" | "marker" | The ink: terracotta marker, highlighter, grass marker or sky marker. |
| getValueLabel | (value: number, max: number) => string | - | Radix: builds aria-valuetext. Or pass aria-valuetext yourself. |
| seed | string | number | - | Pins the hand: the same seed always draws the same bar. Default: derived from useId(). |
The files the CLI copies into your project.
Loading the source