Metric Strip
A row of large figures that roll up digit by digit when scrolled into view, each with a sparkline that draws in after it.
Overview
For the proof section of a landing page or an annual report. Each figure is set large in tabular numerals and, when the strip first enters the viewport, every digit rolls from zero to its value through its own column, left to right and figure by figure.
Prefixes and suffixes ($, %, min, B) sit in a lighter, smaller weight, so the number stays the hero. An optional series draws a thin sparkline under each figure once its digits land. Hairline dividers separate the cells and turn into a two-column grid on phones.
The real values are rendered as text for screen readers, and the rolling digits are hidden from them. Light and dark (.dark), one CSS file, and reduced motion shows the final values immediately.
When to use
- Marketing and product pages that need a complete, responsive band of content.
When not to use
- Inside dense app screens, where a smaller component fits better.
Installation
pnpm dlx shadcn@latest add https://sundaeui.dev/r/metric-strip.jsonnpx shadcn@latest add https://sundaeui.dev/r/metric-strip.jsonyarn dlx shadcn@latest add https://sundaeui.dev/r/metric-strip.jsonbunx --bun shadcn@latest add https://sundaeui.dev/r/metric-strip.jsonWorks in any React project. Files are written to components/sundae/. Read the source in the stage’s Code view. Pro assets need a personal token. See authenticated installs.
- No dependencies beyond React 18 or later.
- Copy metric-strip.tsx and metric-strip.css into components/sundae/.
- The CSS file is imported by the component, so no extra configuration is needed.
- Import the component and use it as shown below.
Usage
import { MetricStrip } from '@/components/sundae/metric-strip'
<MetricStrip
title="In numbers"
metrics={[
{ value: 4812, label: 'Teams reporting weekly', series: [12, 15, 19, 27, 36, 48] },
{ value: 99.98, decimals: 2, suffix: '%', label: 'Sync uptime' },
]}
/>Props
| Prop | Type | Default |
|---|---|---|
metrics*value, label, prefix?, suffix?, decimals?, detail?, series? | Metric[] | — |
titleSmall label above the strip. | string | — |
Accessibility
- Each figure is a <dt>/<dd> pair; the value is real text for screen readers.
- Rolling digits and sparklines are aria-hidden.
- Reduced motion shows final values at once.
Customization
- Colours are --ms-* custom properties on .sd-ms; dark values under .dark.
- Roll timing lives in .sd-ms__strip (1600ms, 70ms per digit).
FAQ
- Is Metric Strip free?
- Metric Strip is part of Sundae Pro. The live preview is open to everyone; the source installs with a Pro account.
- How do I install Metric Strip?
- Run npx shadcn@latest add https://sundaeui.dev/r/metric-strip.json. The files are written to components/sundae/. It has no dependencies beyond React 18 or later.
- Does Metric Strip support keyboard and screen readers?
- Each figure is a <dt>/<dd> pair; the value is real text for screen readers. Rolling digits and sparklines are aria-hidden.
- Does Metric Strip respect reduced motion?
- Reduced motion shows final values at once.
More like this
All sections →- Pro
Aperture Hero
Sections · Refined - Pro
Chapter Features
Sections · Refined - Pro
Odometer Pricing
Sections · Refined - Pro
Testimonial Columns
Sections · Refined Margin Quote
Sections · Editorial- Pro
Ledger Pricing
Sections · Editorial