shadcn.io is not affiliated with official shadcn/ui
Centered Two-Column Plan Card Hero Block for React
A centered pricing hero with Free and Pro side by side in one hairline band, the Pro cell tinted and holding the Shine Button, and a plan switch on phones.
Installation
Overview
A centered hero that puts pricing on the first screen, for React with Base UI, shown here for Plover, an uptime monitor. A bold two-line headline and a promise sit over one band that spans the page column, ruled top and bottom with + marks on its corners. The band holds two cells that share a single hairline: Free and Pro, each with its name, a one-line description, the monthly price at display size, a full-width call to action and a checklist. Pro's cell is tinted, carries a Most teams badge and the filled Shine Button; Free gets an outline Button. A line of trial terms closes the block. Below md a Free and Pro switch shows one plan at a time, Pro first, so the Shine Button is on the first screen. Built with Segment Group, Badge, Guides, Shine Button and Button, with Lucide icons, Tailwind CSS and a CSS entrance that stays still under reduced motion. For SaaS landing pages, subscription products and any page where a free tier and one paid plan are the whole offer.
FAQ
How do I change the plans and prices?
Edit the PLANS array at the top of the file. Each plan has an id, a name, a description, a currency and a monthly price, its features, the call to action's label (cta) and href, and an optional badge. The plan marked featured gets the tint, the Shine Button and is the one the phone shows first; the other gets an outline Button. The trial terms under the band are the TERMS array.
How do I send each plan to sign-up or checkout?
Both calls to action are links: point Free's href at your sign-up page and Pro's at your checkout with the plan in the query (/checkout?plan=pro), and work the price out again on the server rather than trusting the page.
On Base UI, each button renders its link with render={<a href={plan.href} />} and nativeButton={false}.
What do screen readers hear?
The headline is the page's one h1 and each plan's name is an h2, so the plans can be reached from the headings list. The price is read as 19 dollars per month: the visible /month is hidden and a visually hidden per month is read instead. The features are a list, their check marks are decorative, and the trial terms are a list of three, with the dots between them hidden. On a phone the plan that is switched off is invisible, so it leaves the tab order and the accessibility tree.
How does the hero fit on a phone?
Below the md breakpoint a Plan switch of Free and Pro sits under the promise, and the band shows the chosen plan, Pro by default. Both plans share one grid cell, so the block keeps the taller plan's height and the page doesn't jump when you switch. The Shine Button ends about 545 px down the first screen. Above md the switch is gone and the two cells sit side by side at the same height, so their calls to action line up whatever the length of each checklist. Below sm the trial terms stack, without the dots.
How do I make the Pro plan stand out more?
Pro is set apart by structure, not colour: a tint, a badge and the one filled button, while the page's primary colour stays on that button only. For more, give its cell ring-1 ring-foreground/15 and a shadow-sm, or enlarge the price. Avoid filling the whole cell with bg-primary: the theme's accent changes from preset to preset and a flat primary surface loses its contrast in some of them.
Related
- Pro
A compact centered hero that leads with its one price: a launch pill, a headline and a sentence, then the price in a hairline frame beside a Shine Button and three trust points.
- Pro
A centered single-plan hero with a monthly and annual switch under the headline, then one band split by a hairline: the price beside a Shine Button, and six included features.
- Pro
Split Panel Comparison Hero
Features and tablesA split hero for a status-page product: the headline and two calls to action beside a comparison table against a self-hosted page, in a hairline frame.
- Pro
Checklist Hero
PricingA showcase hero for a single plan: the headline and the price in a card in card, over a grid of eight included features that share their hairlines.
- Pro
Split Layout Feature Comparison Table Hero
Features and tablesA reverse split hero between solid rails: a compact comparison table in a framed figure beside a headline, a Shine Button and three trust points, with your column tinted.
- Pro
Hero With Stats
Stats and live dataA 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.