Skip to content

Progress bar

Track and fill bar with spring-animated width, travelling shimmer highlight, and cursor-proximity pastel glow on the track border. Fill colour shifts with cursor position via pastelColour.

  • Spring Physics
  • requestAnimationFrame
  • pastelColour

progress-bar

Move your cursor near the bars.

Usage

Drop it in

import
import { ProgressBar } from "@/app/lib/components/progress-bar";
example 1
<ProgressBar value={65} showLabel />
<ProgressBar value={100} />

API

Props

PropTypeDefault
value*

Progress value 0-100

number—
showLabel

Show percentage label

booleanfalse
className

Additional class names

string""
ariaLabel

Accessible name for the progress bar

string—

Read from the component's source at build time. * required.

Accessibility

Works with

Cursor
Reacts to where the pointer is, not just whether it's over the element.
Touch
Follows your finger while it's down, then settles a moment after you lift.
Keyboard
Focus lights it up the way the cursor does. Every action has a key.
Reduced motion
Nothing moves or springs. Colour still answers, without drifting.