shadcn.io is not affiliated with official shadcn/ui
Two Plans Pricing Block for React
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.
Installation
Overview
Present a free tier and a paid upgrade side by side with this two plans pricing section, shown here for Sidenote, a website feedback tool. A header row has the headline and one sentence on one side and a monthly and annual Segment Group on the other, over two plans, each a card in a card: a free Personal plan and a Team plan whose raised panel has a shadow, an outline Best value Badge beside its name and the only filled Shine Button. Team's price rolls from $16 to $13 with Sliding Number when the billing period changes, and the line under it says how it's billed. The plans sit between the page's side rails drawn by Guides, with + marks on the corners of the area that holds them. The button is on the first screen on a laptop, and on a phone Team comes first and its seven features collapse after five behind an "All 7 features" button. Built with Badge, Frame, Guides, Segment Group, Shine Button, Sliding Number and Lucide icons, with CSS transitions only. For freemium products, developer tools, side-project platforms and any SaaS with one free and one paid tier.
FAQ
How do I change the plans, prices and features?
Edit PLANS at the top of the file. Each plan has its name, description, monthly price and annual price (the monthly amount when billed yearly), a featureHeading, a list of features, cta, href, an optional badge and featured, which raises the panel and fills the button. A plan whose monthly price is 0 shows "Free" instead of a number. The currency sign is CURRENCY, PHONE_FEATURES is how many features a phone shows before the toggle, and billedOf writes the line under each price.
How does the monthly and annual switch work?
It's a SegmentGroup labelled "Billing period": a group of two radio options, so arrow keys move between them and the choice is announced as "Annually, 2 of 2". Choosing one sets the billing state, Team's price rolls from 16 to 13 with SlidingNumber, and the line under it changes to "Billed annually at $156/year". The price row keeps a fixed height so the plans don't move.
What changes on a phone?
The plans stack with Team first, since it's the recommended one, so its button is reached within the first screen and a half, and Personal follows. Team's list shows its first five features and an "All 7 features" button reveals the rest; the button is a native button that reports whether the list is open. From the md breakpoint the plans sit side by side in their own order, Personal first, and every feature shows.
How do the two cards stay aligned?
From the md breakpoint each plan spans two rows of a shared grid with grid-rows-subgrid, so the headers line up and the prices, buttons and feature lists start at the same height, however long a description is. The name row keeps the height of the badge on both plans for the same reason.
How do I send the chosen billing period to checkout?
Each call to action is a real link. It's a ShineButton with render set to an a element and nativeButton={false}. Build the href from the plan and the billing state, for example /checkout?plan=team&billing=annually, and map each pair to its price on the server, so the page never decides what a customer is charged.
Related
- 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
Free vs Pro Pricing
Single planOne 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
Two Plan Comparison Pricing
Comparison tablesSelf-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
Annual Savings Pricing
Billing switchesThree plans that show what yearly billing saves: each plan's head holds two bars, twelve monthly payments against one yearly payment, with the saving printed in the gap, under a monthly and yearly switch.
- 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
Side by Side Pricing
Comparison tablesA before and after reveal: drag a handle across one photo editor to turn the Free version into the Pro version, with each half's price and button right under it.