Install
Pull Progress from the barrel for everyday use, or the granular path when you want a tighter bundle.
import { Progress } from "@brika/clay";import { Progress } from "@brika/clay/components/progress";A minimal example
Drop this into a page. Native HTML attributes pass through to the underlying primitive.
'use client';
import { Progress } from '@brika/clay/components/progress';
/** Basic determinate progress bar, pass `value` 0 to 100. */
export default function ProgressDefaultDemo() {
return (
<div className="w-full max-w-xs">
<Progress value={66} />
</div>
);
}Progress, every way
Accessibility
- Carries
role="progressbar",aria-valuenow,aria-valuemin, andaria-valuemaxautomatically. - Pair with a visible label or
aria-labelso AT announces what is progressing. - Indeterminate state should also carry an accessible description explaining the uncertainty.
Theme tokens
Every CSS variable Progress reads, with its default and the
dotted path you'd write in a ThemeConfig JSON
to override it. Set any of these in your theme to retune Progress
without touching component code.
Progress tokens
3 tokens--progress-track-colorcolorvar(--secondary)components.progress.trackColorBackground of the progress track.
--progress-indicator-colorcolorvar(--primary)components.progress.indicatorColorForeground of the progress indicator.
--progress-track-heightsize0.5remcomponents.progress.trackHeightProgress track thickness.
Override in a theme
Authoring a theme is plain JSON. Drop overrides under
components.progress, the names
are camelCase versions of the variable suffix.
{
"id": "my-theme",
"name": "My Theme",
"description": "...",
"accentSwatches": ["#000"],
"components": {
"progress": {
"trackColor": "var(--secondary)"
}
}
}
Then apply with applyTheme(myTheme)
(see the theming guide),
scope it to a subtree with themeToCssVars(myTheme, mode),
or consume any token directly in your own JSX with the matching Tailwind utility
(e.g. bg-progress-…) — see the
chips on each token row.
API reference
Props specific to Progress. Native HTML attributes pass through to the underlying primitive, see the component source on GitHub for the full type signature.
No wrapper-specific props, all attributes pass through to the underlying primitive.