Skip to content
roguelite labsAnthony Spezzano ↗
Skills/CountUp

CountUp

Viewport-triggered animated counter with cubic ease-out. Triggers once when element scrolls into view.

Use and inspectUse this pattern for the stated interaction and keep its keyboard path visible. Reset preview remounts the local example; it does not establish production persistence or a backend integration. Add a reduced-motion fallback where the source animates.Next: inspect the source and adapt its event or data boundary.
CountUpViewport-triggered animated counter with cubic ease-out. Triggers once when element scrolls into view.
npm install framer-motion
This component requires framer-motion.
PropTypeDefaultDescription
end*numberTarget value to count to
startnumber0Starting value
durationnumber1.8Animation duration in seconds
prefixstring""Text before the number
suffixstring""Text after the number (e.g. %)
localebooleantrueFormat with toLocaleString()