Components / Data display
Progress
Linear progress bar.
import { Progress } from "@stylhero/ui";
Example
Code
import { Progress, Stack } from "@stylhero/ui";
function ProgressExample() {
return (
<Stack gap={4}>
<Progress label="Uploading" value={64} valueText />
<Progress label="Checking prices" tone="accent" />
</Stack>
);
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label |
ReactNode |
- | |
max |
number |
100 |
|
tone |
"primary" | "success" | "accent" |
"primary" |
|
value |
number |
- | 0 to max. Leave out for an indeterminate (moving) bar. |
valueText |
boolean | string |
- | Show "40%" (or a custom string) next to the label. |
Also takes every <div> attribute (id, style, data-*, aria-*, event handlers…), passed to that element.
Accessibility
role="progressbar"witharia-valuenow,-minand-max; withoutvalueit's indeterminate.
Generated from src/components/Progress.tsx. Something wrong or missing? Open an issue.