shadcn.io is not affiliated with official shadcn/ui
Popular Choice Pricing Block for React
What customers chose: a full-width segmented bar sized by the share of teams that picked each plan (18, 64 and 18 percent), where each segment is a tab that opens its plan, with its price, call to action and features, right under the bar.
Installation
Overview
Show where other buyers landed with this popular choice pricing section, shown for Porchlight Chat, a live-chat product. The bar is the hero: three segments as wide as the share of teams that chose each plan, 18% Basic, 64% Growth and 18% Scale, each with its percentage under it. Each segment is a tab in a Tabs list, so choosing one opens its plan in a band under the bar: the name, a price at display size that rolls with Sliding Number, a Shine Button and the features it adds, split from them by a hairline with + marks on the band's corners. Growth is open first, carries an outline Most chosen Badge and the section's one primary button. The bar's fills use the foreground colour, never a palette colour. Built with Tabs, Sliding Number, Badge, Shine Button, Guides and Lucide icons, with CSS transitions only. For SaaS pricing pages with a clear favourite and the data to prove it.
FAQ
How do I change the plans and the shares?
Edit the PLANS array at the top of the file. Each plan has its name, description, monthly price, call to action (cta and href), a featureHeading and its features, and a share, the percentage of teams that chose it. The segments' widths come from share, so they follow whatever numbers you give them, but the shares should add up to 100. POPULAR_ID is the plan that opens first and gets the Most chosen badge and the primary button; the line under the bar says what the shares measure.
Where do the percentages come from, and what if I don't have them?
Work them out from your own subscriptions, for example the plans picked by every team that started a paid plan in the last 90 days, and say so in the line under the bar. Don't invent a figure: if you don't have the data, a bar of invented numbers is a false claim. Use a block without one, such as a featured plan with a badge, until you do.
How do I connect the buttons to checkout?
Each call to action is a real link to its plan's href. It's a ShineButton with render set to an a element and nativeButton={false}. Add the plan to it, such as /checkout?plan=growth, and let your server pick the matching price from your payment provider.
Is the bar accessible?
Yes. It's a real tab list named "Plans, sized by the share of teams that chose them", and each segment is a tab named after its plan and its share, such as "Growth, chosen by 64% of teams". Tab reaches the selected segment, the arrow keys move between segments and open their plan, and the open plan is the tab panel. The coloured fill and the percentages are decorative copies of the tab's name, so a screen reader doesn't read them twice, and the open segment is marked by its solid fill and its darker percentage, not by colour alone.
How does it look on a phone?
The bar stays one row, its segments shrinking in proportion, so the 18% segments are still wide enough for their percentage and name at 320px. The open plan stacks: the price and the button come first, with the features under them, so the button is within the first screen and a half. Choosing another segment swaps the plan in place.
Does the page move when I open another plan?
The band under the bar follows the open plan's feature list, so content below it moves a little when the lists differ in length (seven features each here, though their lines wrap differently on a phone). Keep the lists about the same length, or leave room under the block, if something sits directly below it.
Related
- “Pro
Social Proof Pricing
Proof and guaranteesPricing beside proof for a reviews widget: a 4.9 rating at display size, a customer quote, a stats grid and customer wordmarks on one pane, two horizontal plan cells under a monthly and yearly switch on the other.
- Pro
Featured Plan Pricing
Single planOne plan in the spotlight: an oversized card under a monochrome cone of light with the price as the largest type on the page, a monthly and yearly switch, and a short pitch beside it.
- Pro
Billing Toggle Pricing
Billing switchesThree plan cards under a monthly and yearly switch that wears its saving in the header row, with prices that roll to their new amount and each plan a card in a card.
- Pro
Three Columns Pricing
Plan cardsThe canonical three-column pricing section for a team knowledge base: Personal, Team and Company cells under a monthly and yearly switch, each outlined by hairlines that overshoot its corners, the recommended plan raised, one plan at a time on phones.
- Pro
Contrast Highlight Pricing
Plan cardsThree plans for a cloud IDE in one hairline band, with a contrast highlight that follows the theme: the recommended plan is one raised card among flat cells, with a free tier, prices that roll under a monthly and yearly switch, and a plan switch on phones.
- Pro
Comparison Table Pricing
Comparison tablesFour plans compared feature by feature in one table whose hairlines meet the page rails, with a billing switch, a tinted popular column and, on a phone, a plan switch that keeps the feature column beside one plan.