Ali Imam

Counter Number

Component

About

An animated number counter that smoothly transitions from a start value to a target value, with support for currency, locale formatting, prefixes/suffixes and color/size variants.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Counter Number to your project and fits it to your theme.

Code

How Counter Number is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import CounterNumber from "@/components/ui/counter-number";

const settings = {
  value: 12345,
  duration: 1500,
  decimalPlaces: 0,
};

export default function Demo(props: Partial<typeof settings>) {
  const s = { ...settings, ...props };
  return (
    <div className="flex h-full w-full items-center justify-center">
      <CounterNumber {...s} size="2xl" color="primary" />
    </div>
  );
}

More by Ali Imam

View all
  • Liquid Glass Button

    Liquid Glass Button

    6.7K
  • Shader Animation

    Shader Animation

    3.7K
  • WebGL Shader

    WebGL Shader

    2.6K
  • Shader Lines

    Shader Lines

    2.3K
  • Shiny Button

    Shiny Button

    2.2K
  • GLSL Hills

    GLSL Hills

    2.1K
  • Canvas

    Canvas

    1.8K
  • Gallery

    Gallery

    1.5K