Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

By The Numbers Bento About Block for React

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.

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 company numbers section for React with Base UI, written for Sumwell, a fictional expense tool. One lead cell, two columns wide and two rows tall from lg, holds the customers served as a large figure that rolls up once on view, with a line saying where it was a year ago and a twelve-bar trend of the last twelve month-ends, the latest bar in full weight. Five smaller cells sit around it, each tagged People, Customers or Product with a quiet badge and footnoted with how the figure was counted, such as "counted at quarter end". The cells share hairlines and run from rail to rail, and the band ends the block, so the next block's top rule is its foot. On a phone the lead comes first and the cells follow two across. It's built from Guides, Badge and Sliding Number, with CSS transitions for the entrance and your theme's tokens for every colour. For about pages, investor updates and any page that needs one big number and its context. The figures are example data.

FAQ

How do I change the figures and the groups?

The month-end readings are MONTHLY, oldest first: the lead figure, the year-ago line and every bar's height are computed from it. The five small cells are FACTS: each has a group (People, Customers or Product), a label, a value, an optional suffix and the note that says how it was counted. All the figures are example data: replace the arrays at the top of the file with your own.

How is it read by a screen reader?

The whole bento is one description list. Each small cell gives its group and its label as two terms, then the figure and the footnote as descriptions, so it reads "People, Teammates, 64, counted at quarter end". The trend is one image with a text name that gives the first and the last month-end; the same two numbers are in the lead's sentence.

Does the figure count up?

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.

Why do the bars not start at zero?

The bars show direction, not size: the lowest month-end keeps a short stub and the highest reaches the top, so a steady climb reads as one. The exact start and end are written beside them in text, so nobody has to read a value off a bar.

Why does the block end on the cells?

Every block draws only its top rule; the next block's top rule is this one's bottom edge. The cells share their hairlines and draw no rule under them, so a stack of blocks never shows two lines close together.

How does it fit on a phone?

The lead spans both columns and comes first, then the five cells sit two across, with the last one full width. Nothing scrolls sideways at 320 pixels, and in a right-to-left layout the figures stay in reading order.

  • Pro

    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.

  • Pro

    An asymmetric bento for a subscription-analytics tool: a hero cell with the customer count over a ladder of milestones (1,000, 5,000 and 10,000 reached, with the month, and 25,000 next), and three smaller cells that say why each metric matters.

  • 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

    A company's story told through four figures: a title stuck at the start while the reader scrolls, and rows that pair each large number with two sentences on how it happened.

  • Pro

    A community's growth in one framed area chart, month by month for a year, beside three channel counts (forum, chat, office hours) that roll up as they scroll into view.

  • 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.