Interactive

Counter

A number whose digits roll like a mechanical counter, each place on its own spring, passing through the digits in between.
import { Counter } from "pleate/effects/counter";

Rolling digits

1284

Props

value

Whole number to show.

number

minDigits

Pad with leading zeros.

numberdefault 1

fontSize

Size in px; the window follows it.

numberdefault 64

fade

Edge fade as a share of the digit height.

numberdefault 0.18

stiffness

Spring stiffness.

numberdefault 120

Accessibility

  • Screen readers get the plain number; the digit columns are hidden.
  • Reduced motion jumps to the new value.