Componentmedia0.91 KB gzipZero dependencies
Countup
Mechanical turnstile odometer counter with animated tally and slot frames.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add countupOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { Countup } from "@/components/ui/countup"; <Countup end={8492} duration={1500} label="TICKETS ADMITTED" />Source code
countup.tsx + 1 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| end | number | Configures end. |
| start | number | Configures start. (Default: 0) |
| duration | number | Configures duration. (Default: 1500) |
| prefix | string | Configures prefix. (Default: "") |
| suffix | string | Configures suffix. (Default: "") |
| separator | string | Configures separator. (Default: ",") |
| decimals | number | Configures decimals. (Default: 0) |
| label | string | Accessible label text rendered or attached to the control. (Default: "TICKETS ADMITTED") |
| variant | "odometer" | "minimal" | "badge" | Visual style variant. (Default: "odometer") |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |