Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Headroom Bars Pricing Block for React

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.

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

Make the upgrade gap feel tangible with this headroom bars pricing section, shown here for Pulsecheck, an uptime monitor. The header and both prices sit in a column on the left, and on the right a single card, framed by solid hairlines with a + mark on each corner, holds five bars, one per limit: monitors, checks per hour, check history, status pages and SMS alerts. Each bar starts from a small Free baseline, grows to the Pro capacity on first paint, and ends in a chip that rolls up to how many times more Pro gives with Sliding Number. Every row has its Lucide icon and the Free and Pro values side by side, with no info buttons to open. The upgrade link, a Shine Button and the block's one primary button, sits at the card's top right, so it's on the first screen of a laptop and of a phone; the Free and Pro prices sit large beside the card, and under it on a phone. Built with Badge, Sliding Number, Shine Button, Guides and Lucide icons, with CSS transitions only. For in-product upgrade prompts, free-to-paid conversion pages, limit-reached screens and any pricing page that turns abstract limits into a visible gap between two tiers.

FAQ

How do I change the limits, multipliers and prices?

Edit the LIMITS array at the top of the file. Each limit has its label, Lucide icon, the free and pro values as written, the multiplier shown on its chip and monthly, which writes "/ mo" after the label. The bars size themselves from the multipliers, so there's no width to set. FREE_PRICE, PRO_PRICE and CURRENCY fill the prices. Keep each multiplier equal to the Pro value divided by the Free one, since the chip claims it.

How are the bar lengths worked out?

On a log scale: the largest multiplier fills the track and the others take their share of it (Math.log10(multiplier) against the largest), with a floor of 20% so a small gap still reads as a bar. A linear scale would turn a 10× next to a 50× into a sliver. The track keeps room for the chip at its end (3.5rem), and the chip sits just past the bar's far edge on a solid backing, so it rides along as the bar grows and never runs off the card. The Free baseline is painted on top of the bar at a fixed 12% of that range, so the bars show the jump, not the exact ratio: the chip and the values carry the numbers.

What moves, and what happens with reduced motion?

The header, prices and card fade up, each bar grows from the start of its track with a CSS width transition (staggered row by row) and each chip's number rolls up from zero once it scrolls into view. Widths, not transforms, so the chip stays undistorted and the bars grow from the right in a right-to-left layout. Under reduced motion the bars are drawn at full length at once and the numbers change without rolling.

What does a screen reader hear for each row?

The limit's name, then the two values, each prefixed with its plan in visually hidden text ("Free: 5", "Pro: 100"); the visual column labels are hidden, since every value already names its plan. The bar is one image named for the gap, "Pro gives 20 times the Free limit", so its segments and chip aren't read piece by piece, and "/ mo" is read as "per month". The prices are a description list of Free and Pro.

How do I connect the upgrade link to checkout?

The call to action is a real link. It's a ShineButton with render set to an a element and nativeButton={false}. Point its href at your checkout with the plan, for example /checkout?plan=pro. For signed-in Free users, upgrade the existing subscription on the server rather than starting a new one, so their monitors and history carry over.

How is the card framed, and how does it sit in a stack of sections?

The card is a bg-card panel with a Guides frame around it: solid hairlines on all four sides and a + mark on each corner. The section itself draws only the page's two side lines and one rule along its top, so it joins the section above and below without doubling a line. The frame is decoration and is hidden from assistive technology.

  • Pro

    One card with a big Free and Pro switch: flipping it rolls the price and turns the locks on Pro's features into checks, in a single list of eight.

  • Pro

    Self-hosted against cloud for a code host: two compact heads with their prices and buttons, over a nine-row matrix that marks the stronger side of each row.

  • Pro

    Four backup plans drawn as columns of a storage chart, to scale: choosing a column shows its plan's price, price per terabyte, features and call to action beside the chart.

  • Pro

    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.

  • Pro

    Feature Diff Pricing

    Comparison tables

    One upgrade shown value by value: the price and call to action in one column, and in the other a ruled ledger with the Free limit struck through beside the Pro value on every row.

  • Pro

    A free Personal plan beside the recommended Team plan as two cards in cards, with the monthly and annual switch in the header row and Team's price rolling to its annual amount.