Primitive / Atombeta
Count Up
Counts a number up on scroll with the active animation engine, jumping to the end value when motion is off.
pnpm dlx @glinui/cli@latest add count-upDownloads this week
84,200
Satisfaction
98.6%
Revenue
$48,920
Installation
Install from
pnpm dlx @glinui/cli@latest add count-upPrefer the package?
Usage
Motion engine
12,480+
// pnpm add motion (separate dependency, optional)// Once at your app entry:import "@glinui/motion/register/motion"
import { CountUp } from "@glinui/ui"
export function Demo() { return <CountUp engine="motion" value={12480} suffix="+" className="text-3xl font-semibold" />}GSAP engine
12,480+
// pnpm add gsap (separate dependency under GreenSock's own license, not bundled by GLINUI)// Once at your app entry:import "@glinui/motion/register/gsap"
import { CountUp } from "@glinui/ui"
export function Demo() { return <CountUp engine="gsap" value={12480} suffix="+" className="text-3xl font-semibold" />}Static (animations off)
12,480+
import { CountUp } from "@glinui/ui"
export function Demo() { return <CountUp motion="none" value={12480} suffix="+" className="text-3xl font-semibold" />}Accessibility
- Assistive tech always reads the final value: the accessible copy is rendered once and never changes.
- The animating digits are aria-hidden, so there are no repeated announcements.
- The invisible final value reserves the width, so the layout never shifts while counting.
Reduced Motion
Reduced motion and motion="subtle" jump straight to the final number.
Affected properties
number tweenAPI Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
value | number | Yes | - | Final value. |
from | number | No | 0 | Start value. |
decimals | number | No | - | Fraction digits. Defaults to the digits of value. |
locale | string | No | - | Intl.NumberFormat locale. |
prefix / suffix | string | - | - | Text around the number, for example $ or +. |
format | (value: number) => string | No | - | Custom formatter. Overrides decimals and locale. |
duration / delay / spring / once / threshold / immediate | see Reveal | - | - | Same behavior as Reveal. |
engine | EngineName | No | "css" | Animation engine. css is built in with zero dependencies; motion and gsap are opt-in (import "@glinui/motion/register/<name>" and install the package). Falls back to MotionEngineProvider, then data-glin-engine on <html>, then css. |
motion | MotionLevel | No | "system" | none renders the final state with no animation, subtle animates opacity only, system follows prefers-reduced-motion. |
delay | number | No | - | Auto-generated from TypeScript source. |
duration | number | No | - | Duration in ms. |
immediate | boolean | No | false | Auto-generated from TypeScript source. |
once | boolean | No | true | Auto-generated from TypeScript source. |
prefix | string | No | "" | Auto-generated from TypeScript source. |
spring | SpringInput | No | - | Auto-generated from TypeScript source. |
suffix | string | No | "" | Auto-generated from TypeScript source. |
threshold | number | No | - | Auto-generated from TypeScript source. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Import
import { CountUp } from "@glinui/ui"Source Files
Dependencies
@glinui/ui@glinui/motionGenerated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/count-up.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
CountUpProps
CountUpProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
decimals | number | No | - | - |
delay | number | No | - | - |
duration | number | No | - | Duration in ms. |
engine | EngineName | No | - | Engine override: `css` (default), `motion`, `gsap` or a registered custom engine. |
format | (value: number) => string | No | - | Custom formatter. Receives the raw value. Overrides decimals and locale. |
from | number | No | 0 | Start value. Default 0. |
immediate | boolean | No | false | - |
locale | string | No | - | - |
motion | MotionLevel | No | - | Motion override. `none` renders the static final state, `subtle` is opacity only. |
once | boolean | No | true | - |
prefix | string | No | "" | - |
spring | SpringInput | No | - | - |
suffix | string | No | "" | - |
threshold | number | No | - | - |
value | number | Yes | - | Final value. |