Rolling digit counter
Digits that spin on their rollers like a mechanical counter before stopping on the right value, in pure CSS.
- Tailwind
- React
- CSS
- WordPress
Description
Each digit is a small window behind which a 0 to 9 strip slides to the right value, with a slight delay from one digit to the next: the odometer effect, ideal to present the key figures of a charity, a company or a fundraiser. No script counts anything: each strip’s position comes from the --efcr-digit variable and only the transform is animated, once on load. The real number is present as text for screen readers and search engines, the rollers being hidden; the description list pairs each figure with its label. Tabular digits, AA contrast in light and dark mode, a grid that drops to one column at 360 px with no horizontal scrolling. With prefers-reduced-motion the digits show their value straight away.
Code
Loading the code…
The code of this component in
Reviews
No reviews yet.
In the same spirit

A large heading whose words turn from grey to ink as the page scrolls, then whose key phrases get a marker stroke, in pure CSS with a readable fallback.
- Tailwind
- React
- CSS
- WordPress

Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.
- Tailwind
- React
- CSS
- WordPress

A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.
- Tailwind
- React
- CSS
- WordPress

A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.
- Tailwind
- React
- CSS
- WordPress