Account

Typography

Creative

Counter Text

Eases out as it nears the target, in the right locale format, with its width reserved. For stats and milestones.

Install

Included with Creative: needs your API key. Initialize and log in once.

Terminal
npx @galactrex/ui add counter-text

Usage

Example
import { CounterText } from "@/components/galactrex/counter-text";

<CounterText to={48210} suffix=" downloads" />

Source

Installs to components/galactrex/counter-text.tsx, with the shared motion primitives beside it.

Source for this component comes with its plan. Install it with the command above, or open your licensed copy here.

See plans

Props

PropTypeDefaultDescription
to / fromnumber— / 0Target and start.
durationnumber1.8Seconds.
localestring—BCP 47 locale.
formatIntl.NumberFormatOptions—Number format.
prefix / suffixstring—Around the number.
classNamestring—Extra classes for the outer element.

Variants

  • Stat. With a suffix like " users".

Accessibility

  • The final value is read; counting is aria-hidden.

Motion and reduced motion

  • Writes text per frame with an expo ease.
  • Reduced motion: final value.