ui-064

Odometer Number Ticker

£7
or the whole Vault, £99

Vertical rolling digit odometer with mechanical carry momentum, direction-aware updates, dynamic column transitions, and currency or decimal formatting.

ScrollTrigger intermediate
8 more details
count-animationnumber-tweenvalue-transitionstaggerscroll-triggerinterruptible-transitionsreduced-motionprogressive-enhancement

Released

About this component

A portable vertical rolling digit odometer built for KPI strips, pricing switches, live counters, and scroll-triggered metrics. Each digit spins inside a softly masked vertical reel while currency signs, separators, decimals, and suffixes stay crisp beside the drums.

Read the full effect overview

Lower-order digits travel through more revolutions than higher-order digits and settle with exponential deceleration, while incrementing rolls upward and decrementing reverses downward without snapping even when triggered rapidly mid-roll.

Odometer Number Ticker - UI component preview

What's included

6 items
  • True mechanical carry roll where lower-order columns spin through more revolutions than higher-order columns
  • Direction-aware, fully interruptible transitions that smoothly redirect mid-roll when values change rapidly
  • Preserves currency symbols, thousands separators, decimals, signs, and suffixes beside the rolling drums
  • Smoothly expands and collapses digit columns when values cross place-value boundaries like 990 to 1,240
  • Supports page-load, scroll-triggered, and manual programmatic triggers on any numeric element
  • Accessible screen-reader readout with instant non-animated updates under reduced motion and no-JS fallback

Perfect for

3 use cases
  • Pricing tables switching between Starter, Growth, and Enterprise or monthly and annual billing
  • Hero KPI panels and SaaS metrics that roll in cleanly on load or when scrolled into view
  • Live dashboards, donation tallies, and seat counters that tick smoothly as new values arrive

How it works

2 sections

Each numeric value is parsed into static formatting characters and place-keyed digit reels, keeping existing drums anchored in place even when the total number of digits grows or shrinks. Every digit sits inside a clipped vertical window with a soft top and bottom fade so neighboring numbers curve naturally into view.

When a value updates, each reel calculates its carry travel from the place-value difference, rolls upward on increases or downward on decreases, and settles with staggered timing from the highest column down to the lowest. A visually hidden readout holds the formatted string for screen readers while reduced-motion visitors receive immediate plain-text updates.

Plugins ScrollTrigger
Difficulty Intermediate
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Lighthouse, as measured

Google Lighthouse on this UI element's demo, from the latest scan. A measurement of the demo as shipped, not a promise for your page.

Accessibility
100
Best practices
100

No performance score, on purpose. That figure depends on how you deploy: your server's compression and caching, your CDN, the connection and the device doing the test, none of which the code controls. The same page can score very differently on two consecutive runs, so measure it where it will live.

The Vault opens this source and the whole library.

Each product gives you the HTML, CSS and JavaScript source, the full documentation and an AI setup prompt, licensed for unlimited personal and commercial projects. Every paid product is tested for desktop and mobile layouts, reduced-motion handling, animation cleanup and keyboard controls wherever there is something to operate.

One payment, over 350 products, and future additions to the library.

Documentation

Quick Start

1. Add to your HTML <head>:

In your downloadThe working code for this step, in index.html.

2. Add before closing </body> tag:

In your downloadThe working code for this step, in index.html.

3. Add the effect HTML anywhere in your <body>:

In your downloadThe working code for this step, in index.html.

Using It With Your Own Design

What the effect needs from your markup: Any inline or block element carrying the data-odometer attribute and a formatted numeric string as its text content (for example £148,920, 99.98%, 42,610+, or $12.4M). The script reads the initial text to infer currency prefixes, thousands grouping, decimal precision, and suffixes, then builds an accessible .sr-only readout alongside an aria-hidden .odo-reels drum container.

What is only the demo's styling: Everything under .showcase-shell, .showcase-toolbar, .odo-panel, .odo-card, .odo-controls, .odo-segmented, and .btn is demo presentation. You can remove those rules wholesale and drop data-odometer onto your own headings, KPI cards, or pricing figures with any font and palette.

CSS the effect depends on: Keep the core rules for .odo-value, .odo-reels, .odo-slot, .odo-digit, .odo-strip, .odo-cell, .odo-static, and .sr-only. In particular:

  • font-variant-numeric: tabular-nums on the host prevents horizontal jitter while digits spin.
  • .odo-digit requires overflow: hidden and matching height on .odo-digit and .odo-cell (1.32em by default) so the vertical strip aligns cleanly inside the masked window.
  • .odo-slot requires overflow: hidden so newly added or removed columns expand and collapse smoothly when digit counts change.

Options

Attribute Values Default Description
data-odometer (boolean attribute) — Marks the element as an odometer ticker
data-enabled true, false true Enable or disable enhancement on this element
data-trigger load, scroll, manual load Roll on page load, on scroll enter, or only when called via JS
data-duration Number (seconds) 1.2 Base roll duration in seconds
data-stagger Number (seconds) 0.055 Stagger delay between higher-order and lower-order digit columns
data-turns 0 to 5 2 Maximum extra full revolutions for lower-order digits on large jumps
data-start ScrollTrigger start string top 85% Viewport trigger position when data-trigger="scroll"
data-once true, false true Whether a scroll-triggered odometer runs once or replays on re-enter

Accessibility

  • Screen readers: The formatted value stays inside a dedicated .sr-only element updated on every value change, while the visual digit drums carry aria-hidden="true" so assistive tech reads "£148,920" rather than a list of digits.
  • No-JS fallback: The original formatted number is authored directly in the HTML and remains immediately visible without JavaScript.
  • Reduced motion: Under prefers-reduced-motion: reduce, rolling reels are skipped and setValue() updates the formatted text instantaneously.
  • Keyboard & touch: Demo controls use native <button> elements with aria-pressed states, >= 44px mobile tap targets, and visible :focus-visible rings.

Dependencies

Required:

  • GSAP 3.12+ (demo pinned to 3.15.0)
  • ScrollTrigger plugin (loaded only for data-trigger="scroll" support)

Optional:

  • None (no smooth-scroll library required)

Also in your download: the full source, worked examples, the events and programmatic API, and the class reference.

£7