Skip to content
satin

Progress

Shows how far a task has got, or that it is still running.

Uploading files

Installation

Terminal
npm i @uisatin/ui
Import
import { 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.

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.

PropTypeDefault
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.