Componentmedia0.91 KB gzipZero dependencies

Countup

Mechanical turnstile odometer counter with animated tally and slot frames.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add countup

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { Countup } from "@/components/ui/countup"; <Countup end={8492} duration={1500} label="TICKETS ADMITTED" />

Source code

countup.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxcountup.tsx126 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface CountupProps extends React.HTMLAttributes<HTMLDivElement> {  end: number;  start?: number;  duration?: number; // duration in ms  prefix?: string;  suffix?: string;  separator?: string;  decimals?: number;  label?: string;  variant?: "odometer" | "minimal" | "badge";  className?: string;} 

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { Countup } from "@/components/ui/countup"; <Countup />
PropTypeDescription
endnumberConfigures end.
startnumberConfigures start. (Default: 0)
durationnumberConfigures duration. (Default: 1500)
prefixstringConfigures prefix. (Default: "")
suffixstringConfigures suffix. (Default: "")
separatorstringConfigures separator. (Default: ",")
decimalsnumberConfigures decimals. (Default: 0)
labelstringAccessible label text rendered or attached to the control. (Default: "TICKETS ADMITTED")
variant"odometer" | "minimal" | "badge"Visual style variant. (Default: "odometer")
classNamestringOptional Tailwind or custom CSS classes merged with component styles.