Skip to content
synccn

Number Ticker

Counts up to a number when it scrolls into view.

$0

Revenue this quarter

Playground

Change the props and copy the code. The controls come from the component's TypeScript types.

$0

Props

duration1400
decimals0
import { NumberTicker } from "@/components/ui/number-ticker";<NumberTicker value={48290} prefix="$" />

Installation

$ pnpm dlx shadcn@latest add @synccn/number-ticker

First time in this project? Connect synccn with one command.

Usage

import { NumberTicker } from "@/components/ui/number-ticker";<NumberTicker value={48290} prefix="$" />

API reference

Generated from the component's TypeScript types, so it always matches the code.

NumberTicker

Counts up to `value` with an ease-out curve once it scrolls into view.

  • valuerequired
    number

    Target value.

  • from
    number

    Default 0

    Starting value.

  • duration
    number

    Default 1400

    Milliseconds to count.

  • decimals
    number

    Default 0

    Decimal places.

  • prefix
    string

    Default ""

    Text before the number.

  • suffix
    string

    Default ""

    Text after the number.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

No ARIA roles, key handling or motion settings in its source. It renders plain elements, so its accessibility comes from the content and labels you give it.