Progress
Shows how far a task has got, or that it is still running.
Installation
npm i @uisatin/uiimport { Progress } from '@uisatin/ui/progress'About 10.0 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.
npx shadcn@latest add https://uisatin.dev/r/progress.jsonAdds progress.tsx to components/ui.
First time with Satin? Set it up once, styles and fonts included, with the installation guide.
API Reference
The Progress component renders a div with role="progressbar", named by its label. It has aria-valuenow while value is set and none while the amount is unknown.
| Prop | Type | Default |
|---|---|---|
value | numbernull | — |
max | number | 100 |
label | ReactNode | — |
showValue | boolean | true |
size | "sm""md" | "sm" |
formatValue | (value: number, max: number) => string | — |
className | string | — |
ref | Ref<HTMLDivElement> | — |
...props | ComponentProps<'div'>Other attributes go to <div> | — |
Accessibility
A div with role="progressbar", named by label (or aria-label), with aria-valuemin, aria-valuemax and aria-valuetext from formatValue. aria-valuenow is set only while the amount is known, so a bar without value reads as indeterminate. The percentage text is hidden, since aria-valuetext says it. Progress is not a live region; announce the end of a long task yourself.
Something wrong or missing on this page?
Report a problemSuggest an improvement