← All components
Text / effect

Count Up

A spring counter that brings figures into focus.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • Duration tunes the original physical spring; settling can take longer than that number of seconds. Zero duration snaps to the final value.
  • Starts once in view, excludes hidden/paused time, and stops at completion. Reduced motion shows the exact target.
  • Values are bounded to ±1e12 and12 decimal places; scientific notation is formatted correctly.
  • The included Demo.tsx and styles recreate the full preview.
React 19framer-motion@12.42.2

React Bits · MIT with Commons Clause. Used with explicit project permission; see bundled notice.

Props

PropTypeDefaultDescription
to (required)numberrequiredTarget value
fromnumber0Starting value
directionup|downupDirection
durationnumber2Spring duration
delaynumber0Start delay
separatorstring''Thousands separator
startWhenbooleantrueStart when visible
classNamestring''Additional outer classes.
onStart() => voidundefinedCalled when the visible count begins.
onEnd() => voidundefinedCalled once after the spring reaches the exact target.
pausedbooleanfalseFreeze the current presentation.
replayTokennumber0Change to replay/reset the component.