v0.0.1

CountUp

Counts a number from its start value up to the target when it enters the viewport.

0

Customize

Props

PropTypeDefaultDescription
tonumber—Target value
fromnumber0Start value
durationnumber1600Animation duration in milliseconds
decimalsnumber0Number of decimal places to keep
separatorbooleanfalseWhether to group thousands with a separator
prefixstring—Text rendered before the number
suffixstring—Text rendered after the number
oncebooleantrueOnly play the first time it enters the viewport
classNamestring—Extra class name

Dependencies

IntersectionObserver