Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Bento Mixed Widgets Hero Block for React

A split hero with the pitch on one side and, across a solid divider, four proof widgets in hairline cells: a counting stat, avatars, a sparkline and a quote.

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 split hero that mixes the pitch with proof, for React with Base UI. On the start side, between solid page rails, an announcement pill, a two-line headline, one sentence and two calls to action for a fictional payments platform: a ShineButton that sweeps a light across it on hover, and an outline Button, both links. Across a divider that meets the top rule in a + mark, four widgets on the end side each draw their own hairline cell with a + on its corner: a payments figure that counts up once with CountingNumber, a stack of merchant avatars with AvatarGroup and AvatarGroupCount, a seven-day volume sparkline drawn as a small SVG, and a merchant's quote. The widgets fade in one after another with CSS transitions that stay still under reduced motion, and every tone comes from the theme: the figures and the line are foreground, and the block has no primary surface. For payments, developer platforms and SaaS products that want metrics and social proof above the fold.

FAQ

How do I change what each widget shows?

Everything is data at the top of the file. PAYMENTS_TODAY is the stat, in thousands, written with one decimal (24.8K). MERCHANTS holds each avatar's initials, VOLUME the sparkline's eight points, and TESTIMONIAL the quote, its author and their role. Each widget is a plain relative box with its own Guides, so a different mix (two stats, a chart and a quote) is a matter of swapping one widget's contents.

How do I feed the stat and the sparkline from real data?

Pass your number to CountingNumber instead of PAYMENTS_TODAY: it renders the value for screen readers at once and counts up to it on load, and a new value counts on from the one showing. The sparkline draws VOLUME in a 100 by 40 box where 0 is the top, so scale your series into that range before you build the paths. Update the change figures and the hidden "in the last 7 days" text with them.

How do screen readers read the widgets?

The headline is the page's one h1, and the pill and both calls to action are links. The stat is a description list, Payments today: 24.8 thousand, +12.4% this week, and the counting number gives screen readers its final value, never the numbers on the way. The avatars are decoration, hidden, and the sentence under them carries the claim. The sparkline is hidden too, and its change is said in words: +38% in the last 7 days. The quote is a figure with a blockquote and a caption naming its author.

How does the split adapt to small screens?

The two sides stack below lg: the pitch first, with both actions on the first screen, then the widgets under a rule that runs the width of the page column. The widgets keep a two-column grid, the stat and the avatars side by side and the sparkline and the quote across both, so nothing scrolls sideways down to 320 px.

How are the cells' lines drawn?

With Guides, the same component that draws the page rails. Each widget has extend="sm", so its lines run a little past its corners, and a + on its start corner; the widgets sit 1.5rem apart so the overshoots never touch. The divider is the widgets' side with lg:border-s, and a Guides with only a start mark puts the + where it meets the top rule.

When should I use mixed widgets instead of the bento grid hero?

Use mixed widgets when you have several real proof points (a headline metric, social proof, growth and a customer quote) that each deserve a cell next to the pitch. Use the bento grid hero when the product is visual first and every tile should show a view of it.

  • Pro

    A showcase hero with the headline on one side and the pitch on the other, over a bento of six labelled product views in cells that share hairlines.

  • Pro

    Metric Tiles Hero

    Stats and live data

    A compact left-aligned hero for an edge network with a live status pill, a Shine Button and an outline button at the end of the row, and four metric tiles below, each a ruled cell with a trend.

  • Pro

    Left-Heavy Metric Cards Hero

    Stats and live data

    A split hero for an API host: copy and two calls to action beside a column, behind a divider, of three metric cells whose lines overshoot their corners and whose figures roll up into view.

  • 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

    Split Stat Overlay Hero

    Stats and live data

    A split hero for a live revenue dashboard: the headline, a checklist and a Shine Button beside a dashboard sketch in a hairline frame, with three stat cards (revenue, users, churn) floating over its edges.

  • Pro

    A compact start-aligned hero with a headline, a Shine Button and an outline action over a closing band that holds one customer's quote, large, beside their rating, name, role and the number it is about.