Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Counters Row About Block for React

Four counters for an uptime monitor in one hairline band, each rolling up once on view with an arrow and a sign for how it moved on last month, under a header that says when the figures were last updated.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A row of counters for React with Base UI, written for Pingdale, a fictional uptime monitor. A start-aligned header carries a headline and one sentence, with "Updated 2 hours ago" at its end. Under it, one band from rail to rail holds four counters (checks run a day, sites watched, time to spot an outage and uptime), separated by single hairlines. Each figure rolls up once as it scrolls into view and each says which way it moved on last month with an arrow and a sign, never a colour. Four across from lg, two by two below it, and the band ends the block. It's built from Guides and Sliding Number, with CSS transitions for the entrance and your theme's tokens for every colour. For status pages, product pages and any about page that wants a few live-feeling numbers in one line. The figures are example data.

FAQ

How do I change the counters?

The four counters are COUNTERS at the top of the file: each has a label, a value, optional decimals, grouping and suffix, the change written with its sign, and down for an arrow that points down. The "Updated" line in the header is plain text; it says "2 hours ago" rather than a time, so it never shows a stale date. All the figures are example data: replace the arrays at the top of the file with your own.

Does it count up under reduced motion?

Each figure is a SlidingNumber with trigger="view": it holds its final width in zeros until the block scrolls into view, then rolls up once. With reduced motion the digits still arrive at their final values, without the roll, and the screen-reader text is always the final number.

What do the arrows mean?

They show the direction of the change, nothing else: a down arrow beside "time to spot an outage" is an improvement, and the block doesn't colour it green or red. The sign is written out too (a true minus sign, so a screen reader says "minus"), and the comparison "vs last month" is text.

How is it read by a screen reader?

The band is a description list: the label is the term and the figure and the change are its two descriptions. The figures are written in full for assistive technology, so "12,480" is read as a number even while it rolls.

How does it fit on a phone?

Two by two. The cells share their rows, so a label that wraps to two lines moves the change line down in both cells of its row and they stay aligned. The comparison drops to its own line under the arrow.

Why is there no rule under the band?

The block ends on the band and draws only a top rule. The next block's top rule is its foot, so the two never double up.

  • Pro

    An asymmetric bento of company figures for an expense tool: a lead cell with the customer count over a twelve-bar trend, and five smaller cells tagged People, Customers or Product, each footnoted with how it was counted.

  • Pro

    Four huge figures for a beekeeping marketplace in a two by two grid with one word under each and nothing else, split by a cross of two hairlines with plus marks.

  • Pro

    A total built from its parts for a scheduling tool: a framed lead with the hours returned over a stacked bar and a legend whose numbers add up to it, and a band of three smaller impact cells.

  • Pro

    Counter Stats Hero

    Stats and live data

    A compact, start-aligned hero for an email API on solid rails: a headline, a Shine Button and an outline button, then four counters in separate cells whose hairlines overshoot their corners.

  • Pro

    Hero With Stats

    Stats and live data

    A split hero with a headline, a Shine Button and a second action beside a rail of four key figures on shared hairlines, each with its period and a small bar trend.

  • Pro

    Connected KPI Bar Stats

    KPI bands and tiles

    Four headline figures for a subscription analytics tool in cells that share their hairlines from rail to rail, each with its change on the month before and a tiny sparkline of the last twelve months.