Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Card Inset Metric Row CTA Block for React

A start-aligned card-in-card CTA for an API platform: a headline, one sentence and two calls to action, with three platform figures in a closing band across the foot of the panel.

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 card-in-card call to action for React with Base UI. A muted shell with + marks on its corners wraps a raised panel that is light on a light page and dark on a dark one. At the start, a large left-aligned headline, a short paragraph and two buttons, the Shine Button and an outline one; across the foot of the panel, a closing band tinted a step darker holds three platform figures (calls per day, uptime, latency) between hairlines, side by side from sm and one per row on a phone. The page's rails and top rule come from the Guides spine, so the block lines up with its neighbours in a stack. It's built from Guides, Shine Button and Button, with CSS transitions for the entrance and your theme's tokens for every colour. For infrastructure products, developer platforms and any closing section where a few hard numbers earn the click.

FAQ

How do I change the figures?

Edit METRICS at the top of the file: each entry is a value and a label. Each figure is a term and its description in one list, with the label under the value, so a screen reader hears "API calls per day, 2.4B+". Keep it to three: they sit side by side in the band from sm and stack, one per row, below it.

Why is the latency written as Under 50 ms?

A figure that carries a sign or a unit is wrapped in a bdi element, so a right-to-left layout keeps "99.99%" and "Under 50 ms" in reading order instead of moving the sign or the unit to the wrong side. The comparison is written as words because a bare less-than sign breaks in markup and reads badly aloud.

Does the inner panel follow my theme?

Yes. The panel has no dark scope, so it is light on a light page and dark on a dark one. Nothing is a fixed colour, so it follows whichever preset you install, and the muted shell, the shadow and the ring keep it separate from the page in both modes.

What moves, and what happens with reduced motion?

The card fades up once when the page loads, with a CSS transition. With reduced motion the transition is off and the section simply appears.

How does it fit on a phone?

The panel's padding steps down and the headline from text-5xl to text-3xl. The three figures stack one per row, divided by hairlines. The two buttons wrap onto separate rows when they don't fit side by side, and nothing scrolls sideways at 320 pixels.

  • Pro

    Stat Strip CTA

    Figures and stats

    A band call to action with the headline and a Shine Button in a header band, then a closing band of three figures that are tabs, divided by solid hairlines: pick a figure to read how it is measured.

  • Pro

    A card in card call to action that follows your theme: one anchor figure at display size with a Shine Button, beside three supporting stats set like a receipt with dotted leaders.

  • Pro

    A reverse-split card-in-card call to action for a migration: a ruled timeline of three steps with a time chip each and a closing total, beside the headline and a Shine Button, with trust points on the shell beneath.

  • 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

    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

    A card-in-card startup-program CTA split in two: one giant credit figure circled by a hand-drawn pen stroke in a hairline frame at the start, and the headline, a three-line checklist, a Shine Button and an eligibility note at the end.