Count Up

0+

About this component

Count Up

A figure that counts up from zero to its value the first time it scrolls into view, with a prefix, a suffix, decimals and thousands grouping, in tabular numerals so nothing shifts.

Usage

The import and the props worth knowing about, in one place.

import { Text7 } from "@/components/beste/component/text7";

<Text7 value={2400} suffix="+" as="p" className="font-serif text-6xl" />

<Text7
  value={4.9}
  decimals={1}
  prefix=""
  duration={2}         // seconds
  grouping={false}     // no thousands separators (years, codes)
/>

Playground

Turn the props on the right; the snippet under them is what you would write to get what you see.

0+

Usage
import { Text7 } from "@/components/beste/component/text7";

<Text7
  value={2400}
  suffix="+"
  as="p"
  className="font-serif text-5xl leading-none tracking-tight text-foreground md:text-6xl"
/>

Props

Read from the component's own type, so this cannot drift from what it accepts.

PropTypeDefaultDescription
value*numberThe number to count up to
prefixstringPrinted before the number, e.g. "$"
suffixstringPrinted after the number, e.g. "%" or "+"
decimalsnumberDecimal places to show
durationnumberSeconds the count takes
delaynumberSeconds before the count starts
groupingbooleanGroup thousands with separators
as"p" | "span" | "dd" | "strong"
classNamestring

More Text components

View all Text
+

Rolling Digits

A number whose digits roll like an odometer, each column sliding to its new figure a beat after the last, whenever the value changes. For prices that switch with a toggle, years, and live counters that climb on their own.

Roomtobreathe.

Turning Word

A sentence whose one word takes turns: each candidate blurs up into place as the last blurs out, on a timer that stops when reduced motion is preferred.

A

Circle Text

A line of text set around a circle that turns slowly, with room in the middle for an initial, an icon or a short word. A seal for corners, footers and hero edges.

Nothing changesall at once.

Line Reveal

Lines of text that rise into view out of their own clipped rows, one after another, the way a heading is unmasked line by line.

Progressrarelyfeelslikeprogresswhileitishappening.Sometimesitisshowingup.

Scroll Highlight

A passage whose words brighten one after another in reading order as it scrolls through the viewport, and dim again on the way back, like a finger following the line.

Roomtobreathe,andawayforward.

Word Stagger

Text that settles in one word at a time, each word rising a few pixels out of a soft blur. Plays on scroll by default, or immediately for heroes.