Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultScrollRolling Odometer
Sliding Notch CardsBrowse all 182Curved Path Text
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Rolling Odometer

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • ScrollTrigger

Setup

npm i gsapregisterPlugin(ScrollTrigger)

More like this

  • Counter
  • Stagger
  • ScrollTrigger

Features.

  • Each digit is its own 0–9 strip that rolls up to its value, like a mechanical counter
  • The rightmost digit starts first and each one to its left follows 0.1s later, so the number settles from the end
  • Commas every three digits and an optional unit (m, atm, %) stay still while the digits roll
  • Rolls once, when the number's top reaches 75% down the screen
  • Screen readers get the plain number ("10,994 m"); the rolling digits are hidden from them
  • Without JavaScript the number shows as plain text
  • Two knobs: roll time and digit stagger
  • Respects prefers-reduced-motion: the digits show their values straight away
  • GSAP and ScrollTrigger

How to get it right.

Use whole numbers

data-odo-value takes digits only: no decimals, minus signs or separators. Write 10994, not 10,994; the commas are added for you. Put units in data-odo-suffix.

Write the final number in the markup too

The number element's text is what shows before the script runs and if it never does. Keep it matching data-odo-value and the suffix.

Keep the roll long

2.5s with power3.inOut reads as heavy and mechanical. Under a second it starts to look like a glitch rather than a counter.

Mind the font

The windows are sized in em and the numbers use tabular-nums, so every digit has the same width. With a font that has no tabular figures each window takes the width of its widest digit, so a 1 sits with extra space round it.

Variations.

  • Default — 2.5s roll, 0.1s between digits
  • Snap — data-au-duration="1.2" data-au-stagger="0.04": quick, almost together
  • Cascade — data-au-stagger="0.3": digits clearly roll in one by one from the right
  • One stat — keep a single odo_stat for a big hero number
  • Your colours — override --odo-text and --odo-muted on the row

Where it fits.

  • Impact or results sections — users, revenue, projects shipped
  • About pages — years in business, team size, cities
  • Case studies — the headline result in large type
  • Fundraising or event pages — totals and attendee counts

Frequently asked.

It rolls to the value it finds at start. To change it, update data-odo-value (and the text), then call window.au.Odometer.refresh(). It rolls again from 0 if the stat is still in the trigger zone.

No. Values with anything other than digits are skipped. Show decimals as a separate stat, or scale the unit (12.5k → 12500).

It rolls when the number's top passes 75% of the viewport height. A number that is already past that point when the page loads rolls straight away; if it's in a container that never scrolls, check that ScrollTrigger is loaded.

Yes. It ships with numbers only. Add <p class="odo_label"> after a number (label in React), or your own markup: only elements with data-odo-value are touched, so labels and the stat wrappers are yours.

Related components.

NewPro

Arc Collage Hero

Scroll

Pro

Rising Card on Scroll

Scroll

Pro

Outline Paint Reveal

Scroll