Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Metric Hero Rows Pricing Block for React

Four CDN plans as rows of one hairline table, each led by its monthly transfer: a bar to scale across the row with the allowance written big at its end, then the price and a call to action.

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

Lead with the headline number of each plan in this metric hero rows pricing section. A compact header, a heading, one sentence and a two-line key of the overage rate and the edge network, sits under the page's top rule and side rails, drawn by Guides with a + mark on each corner of the table below. Its four rows, Hobby, Launch, Scale and Peak, share their hairlines and are under 120 px each, so all four and their buttons fit on a laptop's first screen. Each row runs a bar to scale across it, from 100 GB to 100 TB, with the allowance written at display size over the bar's end, so the figures climb the page like a chart, and the plan's name, its price and its price per terabyte on the start side, which falls from $20 to $9.90, and a Shine Button on the end side. The recommended Scale row carries a Best value outline Badge, a darker bar and the one primary button. On a phone each row keeps its plan and button on one line with the bar and figure beneath. Built with Badge, Shine Button and Guides, with CSS transitions only. For CDN, bandwidth and storage pricing and any plan ladder where one numeric limit is the main difference between tiers.

FAQ

How do I change the tiers and the headline metric?

Edit the TIERS array at the top of the file. Each tier has its name, monthly price (0 shows "Free"), cta, recommended, and its metric: transfer and unit as written ("10", "TB") plus gigabytes, the same amount as a number for the bar and the price per terabyte. To lead with another metric, such as requests or seats, change the unit text in the markup and the numbers; the bars compare whatever you give them. The FACTS array holds the two lines in the header's key.

How are the bars scaled?

On a log scale, because 100 GB to 100 TB is three orders of magnitude and a linear bar would leave three of the four as slivers: reach maps the log of each allowance onto 35% to 100% of the track, so the four bars fill 35%, 57%, 78% and 100%, and the footnote says so. The floor leaves room for the first figure to sit at its bar's end. The bars are decorative (the figure says the amount), grow from the start of their track on first paint, and are drawn at full length at once under reduced motion. In a right-to-left layout they grow from the right.

What does a screen reader hear for each row?

The plan's name first, as an h3, then its price and price per terabyte, the metric ("100 terabytes of data transfer per month") and the link, named with its plan ("Start trial, Scale plan") since three tiers share the label. The grid shows the figure and bar in the middle of the row, but they follow the plan in the page, so a figure is never read as the end of the row before it. The bar isn't read at all.

How do the rows adapt to smaller screens?

From the md breakpoint each row is one line of three columns: the plan in a fixed column, the bar and its figure taking the remaining width, and the button in a fixed column at the end. Below it the row is two lines from the same markup: the plan and its button, then the bar across the full width. A figure never wraps or shrinks below its text: if a short bar is narrower than its figure, the figure keeps its width and the bar grows into it.

How do I connect the calls to action?

Each call to action is a link. It's a ShineButton with render set to an a element and nativeButton={false}. Point the free and paid tiers at your sign-up or checkout route with the tier id (/checkout?plan=scale). Move recommended: true to feature another tier: its badge, primary button and darker bar move with it.

When should I use rows instead of a column of plan cards?

Use rows when one number is the whole difference between tiers and the price should be read against it: a bar to scale shows what each step up buys, and the falling price per unit shows the discount without a sentence. Use cards when each tier has a list of features to carry, and a table or calculator when several metered limits interact.

  • Pro

    Metric Toggle Tiles Pricing

    Charts and figures

    Three plan tiles for a push-notification service under a large four-way quota switch: pick pushes, devices, segments or seats and every tile's headline figure rolls to that plan's limit. A snap carousel on phones.

  • Pro

    Headroom Bars Pricing

    Usage and credits

    One card of capacity bars for an uptime monitor: each grows from a Free limit to Pro's, with a chip counting how many times more Pro gives, and the upgrade button at the card's top right.

  • Pro

    Storage Plans Pricing

    Charts and figures

    Three archival storage plans as cells of one ruled band, each led by an oversized capacity figure with restore time and free restores under it, prices that roll on a monthly and annual switch.

  • Pro

    The densest price list: a type foundry's six licenses set like a menu in mono, each row a name, what it covers and dot leaders running out to its price, with a buy button.

  • Pro

    Tiered API Pricing

    Comparison tables

    API tiers by request quota, with the quota as the headline: four columns open with 10k, 250k, 2M and 10M+ requests a month at display size, then the price, the overage rate and a call to action, over grouped limits and features.

  • Pro

    A fanned deck of plan cards for a flashcard app: the chosen plan's card in front with its price, button and features, the other two peeking out behind, brought forward by a tab list.