Docs
Basic Number Ticker

Basic Number Ticker

A component that animates a number from one value to another.

0%

Source code


Copy and paste the following code into your project:

Examples


Controlling the animation from outside the component

To start the animation from outside the component, you can use the startAnimation function that is exposed via the ref. In this example, the animation (re)start when the component enters the viewport.

Revenue

$0

Conversion Rate

0%

Bounce Rate

100%

Avg. Session Duration

0s

New Users

0

Active Users

0

Props


PropTypeDefaultDescription
from*number0Starting value of the animation
target*number100End value of the animation
transitionValueAnimationTransition{ duration: 3, type: "tween", ease: "easeInOut" }Animation configuration, refer to framer-motion docs for more details
classNamestringundefinedAdditional CSS classes for styling
onStart() => voidundefinedCallback function when animation starts
onComplete() => voidundefinedCallback function when animation completes
autoStartbooleantrueWhether to start the animation automatically