ProgressBar
Progress that moves like it means it: the fill springs to its value with a light travelling along it, turns green with a tick when done, and without a value becomes a sweeping segment. Effects.
Open playgroundUpload progress
About
ProgressBar is a React component in the Effects category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { ProgressBar } from "@ashutoshswamy/smoui" and set showValue, value, value among its 6 props.
Install
npm i @ashutoshswamy/smouiUsage
import { ProgressBar } from "@ashutoshswamy/smoui";
<ProgressBar value={64} label="Upload progress" />Props 6
- showValue
Show the label and a rolling percentage above the bar.
boolean- value
Leave out for an indeterminate bar.
numberundefined- value
Current progress, clamped to 0 through max.
number- max
End of the range.
numberdefault100- label
Accessible name.
stringdefault"Progress"- className
Class on the track.
string
More effects components
- AuroraSlow drifting colour behind your content. Only transforms animate; it stands still with reduced motion.
- BorderBeamA light that runs around the edge of whatever it wraps, at an even pace along straight sides and rounded corners alike. Reduced motion parks it still.
- CompareSliderBefore/after reveal. Drag the divider; the top layer follows on a spring. It sweeps once to show it moves.
- ConfettiButton that throws flat confetti on press. Pieces fly out, tumble, then fall and fade.
- DotFieldA grid of dots that swells and shrinks away from the pointer, then springs home. One canvas, asleep when nothing moves.
- GlassLensA magnifier that drifts after the cursor like a drop of water. Press to zoom further.