Progress
Linear progress bar. Filled and gradient fills across eleven colors, with a built-in indeterminate state — wraps Ark UI's Progress machine for ARIA wiring.
Progress is a linear bar built on Ark UI's Progress state machine, so it ships role="progressbar", the aria-value* wiring, and indeterminate support for free. The fill axis (filled / gradient) and the palette mirror Badge, so a bar and a chip share the same accent language.
import { Progress } from '@42-central/ui-react/progress';
<Progress value={60} />
<Progress variant="gradient" value={70} />
<Progress value={null} /> {/* indeterminate */}
<Progress meter value={72} aria-label="Disk usage" /> {/* a measurement, not a task */}Playground
Component
Dir
Presets
Modes
Props
Code
<Component size="md" value={60} />Full prop browser
Variants
Two fill treatments. filled (the default) routes through the palette; gradient paints its own stops.
Code
<Progress variant="filled" value={60} />
<Progress variant="gradient" value={60} />Colors
Any palette color pairs with the filled variant via the kit's data-color system. Use it for status semantics: green for healthy, orange for warning, red for critical.
Code
<Progress color="green" value={70} />
<Progress color="orange" value={45} />
<Progress color="red" value={20} />Gradient
variant="gradient" defaults to a purple→pink sweep. Pass a gradient config (from / to / via / dir) to customize the stops and direction — same API as Badge.
The gradient spans the full track, not just the filled portion — the bar reveals a left slice of it, so the complete from→to only appears at 100%.
Code
<Progress variant="gradient" value={70} />
<Progress variant="gradient" value={70} gradient={{ from: 'var(--color-cyan-400)', to: 'var(--color-blue-600)' }} />Sizes
Five track heights, matching the kit's xs–xl scale (Slider uses the same).
Code
<Progress size="xs" value={60} />
<Progress size="sm" value={60} />
<Progress size="md" value={60} />
<Progress size="lg" value={60} />
<Progress size="xl" value={60} />Indeterminate
When you can't measure progress, pass value={null} (or omit both value and defaultValue and call it indeterminate). The bar runs an animated sweep — and under the OS "reduce motion" setting it rests as a static partial bar instead of looping.
Code
<Progress value={null} />Meter
A progress bar says a task is advancing. Some bars aren't tasks: an XP level, disk usage, a quota, a skill score. Those are a meter, like HTML's <meter>. Pass meter and the bar announces itself as role="meter" instead of role="progressbar", with the same look.
Code
<Progress meter value={7350} max={10000} aria-label="XP to level 8" />A meter always has a value, so it is never indeterminate: meter with value={null} is a type error. It always fills aria-valuetext too, formatted in the active locale (the locale prop, then IntlProvider, then en-US). The default reads a percentage ("74%"); formatOptions takes any Intl.NumberFormat option, and translations.value (or a plain aria-valuetext) words it yourself.
<Progress meter value={7350} max={10000} /> {/* "74%" */}
<Progress meter value={412} max={500} formatOptions={{ style: 'unit', unit: 'gigabyte' }} />
{/* "412 GB" */}
<Progress
meter
value={7350}
max={10000}
translations={{ value: ({ percent }) => `Level 7, ${Math.round(percent)}% to level 8` }}
/>Thresholds
Like <meter>, low, high and optimum split the scale into zones and colour the bar by the zone the value is in: good (green), warning (orange) or critical (red). The zone holding optimum is good. When optimum sits below low, lower is better (disk usage); above high, higher is better (a score); between them, the middle is good and both ends only warn. Setting any threshold takes over from color, and the zone is also written as data-zone on the bar for your own styling.
Code
{/* Lower is better: green up to 60%, orange to 85%, red beyond */}
<Progress meter value={40} low={60} high={85} optimum={0} aria-label="Disk usage" />
<Progress meter value={72} low={60} high={85} optimum={0} aria-label="Disk usage" />
<Progress meter value={93} low={60} high={85} optimum={0} aria-label="Disk usage" />Thresholds only exist in meter mode: on a progress bar they are a type error, since a task's progress has no good or bad zone. With variant="gradient" the gradient wins over the zone colours.
API
Prop
Type
All other props are forwarded to the underlying Ark Progress.Root.
Accessibility
Ark stamps role="progressbar" plus aria-valuenow / aria-valuemin / aria-valuemax on the bar. In the indeterminate state aria-valuenow is dropped, so assistive tech announces an unmeasured "busy" bar. Provide an aria-label (or wire aria-labelledby to a visible caption) so the bar names what it's tracking; without one, Ark names it by its own value. aria-valuetext replaces the number when words say it better ("Processing", "3 of 8 files"). All four naming props land on the bar itself, not the root:
<Progress value={uploaded} aria-label="Upload progress" />
<Progress value={null} aria-labelledby="file-name" aria-valuetext="Processing" />With meter, the same element becomes role="meter" and keeps aria-valuenow / aria-valuemin / aria-valuemax, plus an aria-valuetext formatted in the active locale. A meter's zone colour is never the only signal: name what is measured, and say "nearly full" in aria-valuetext or visible text when the zone matters.
Changelog
- #388
aria-label,aria-labelledby,aria-describedbyandaria-valuetextland on the progressbar itself
- #320
These entry points ship
"use client", so a Server Component can import them
- #294
asChildis a compile error onCircularProgress,Progress,Rating,Slider,Divider,Field,InputBaseandPillsInput
- #207
Tracks move onto the kit's translucent wash, and the slider thumb's center is brand-tinted
ProgressandCircularProgress, with a gradient variant
Spinner
Inline activity indicator. Inherits color and size by default so Button / ActionIcon embed it cleanly; opt-in props for standalone use.
Circular Progress
Ring progress indicator. Filled and gradient arcs across eleven colors, with a built-in indeterminate spinner — the circular counterpart of Progress.