All components

Components · Learning

ProgressBar

Progress through a lesson. It celebrates once, when it fills.

Try itChange the motion setting at the top to feel each personality.

Use it

<ProgressBar value={3} max={5} label="Lesson progress" />

How it moves

WhenRoleWhat moves
The value changesstate-changeThe fill grows or shrinks to the new value
The bar becomes fullstate-change, then celebrationThe fill changes to the accent color, and the bar pops from the celebration scale back to 1
The bar is resetstate-changeThe fill shrinks back. Nothing celebrates

Rules:

Reduced motion: the celebration scale is 1, so the bar does not pop. The fill still changes size and color, over the shortest duration.

CSS variables used: --ss-motion-state-change-spring, --ss-motion-state-change-spring-duration, --ss-motion-state-change-duration, --ss-motion-state-change-easing, --ss-motion-celebration-scale, --ss-motion-celebration-spring, --ss-motion-celebration-spring-duration.