Basic Number Ticker

A premium animated number ticker component with custom start, target values, transition configurations, and callbacks.

The BasicNumberTicker component creates a smooth, animated numeric transition from a starting value to a target value. Leveraging Framer Motion's robust layout engines, it provides precise control over speed, easing, and timing, making it perfect for dynamic statistics, growth metrics, and dashboards.

Preview

0%

Usage

Installation

$ npx shadcn@latest add https://spark-ui-olive.vercel.app/r/basic-number-ticker.json

Basic Example

import NumberTicker from "@/components/ui/basic-number-ticker";

export default function App() {
  return (
    <div className="text-3xl font-normal font-mono">
      <NumberTicker from={0} target={99} />%
    </div>
  );
}

Variants Preview

Avg. Latency

1.2s linear transition

10ms
Uptime Guarantee

2.5s easeOut transition

90%
Deployments

Manual trigger

+0

Properties

PropTypeDefaultDescription
fromnumber0The starting numeric value of the animation.
targetnumber100The target numeric value to count up or down to.
transitionValueAnimationTransition{ duration: 3, type: "tween", ease: "easeInOut" }Animation configuration, matching standard Framer Motion animation properties (tween/spring, duration, ease, etc.).
classNamestringAdditional CSS classes for custom styling.
onStart() => voidCallback function invoked when the animation begins.
onComplete() => voidCallback function invoked when the animation finishes.
autoStartbooleantrueIf true, start the count animation automatically when mounted.