Sequence
docs
React components

Number counter

An animated number component that counts up to a target value.

Overview

The NumberCounter component smoothly animates a numeric value from 0 (or current) to a target number using Framer Motion.

Usage

import { NumberCounter } from '@/components/core/number-counter';

function Stats() {
  return (
    <div className="text-4xl font-bold">
      <NumberCounter number={1000} duration={3} />
      <span>+ Users</span>
    </div>
  );
}

Props

PropTypeDefaultDescription
numbernumberRequiredThe target number to count to.
duration?number2Duration of the animation in seconds.
...propsMotionProps-Accepts standard Framer Motion span props.

On this page