shadcn.io is not affiliated with official shadcn/ui
Feature Diff Pricing Block for React
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.
Installation
Overview
Make an upgrade concrete with this feature diff pricing section, shown here for Penwright Docs, a docs writing tool. It answers one question for someone already on the free plan: what do I get for $8 a month? Two columns sit between the page's side rails, drawn by Guides. On one side are the headline, the move from Free to Pro as two outline Badges, the price at display size and a full-width Shine Button, the section's only filled control. On the other is a ledger in a frame with + marks on its corners: eight rows, each a feature with the Free limit struck through, an arrow and the Pro value, and an outline chip on the biggest jumps (10× more collaborators, 100× more AI drafts, no cap on documents). The rows are a Data List that slides in from the reading direction's start. The title starts at the top of the column and the button is on the first screen, and on a phone the columns stack with the price and button first. Built with Badge, Data List, Guides, Shine Button and Lucide icons, with CSS transitions only. For upgrade pages, free-to-paid prompts and in-product upgrade screens.
FAQ
How do I change the plans, the price and the rows?
UPGRADE names the two plans (from and to), the monthly price, the billing note and the call to action's cta and href. DIFFS holds the rows: each has the feature's name, its from and to values and an optional badge. Nothing is computed, so keep the chips true to the values beside them: 3,000 AI drafts are 100× the 30 on Free, and 20 collaborators are 10× the 2.
What does a screen reader hear on each row?
The rows are a description list: each feature is a term and its change the definition, read as "AI drafts: from 30 / mo, to 3,000 / mo, 100× more". Visually hidden "from" and "to" carry what the strike-through and the arrow show, and the arrows are hidden. The line above the price reads "From Free to Pro", and the price "$8 per month".
How do the rows fit on a phone?
The two columns stack, with the price and the button first and the ledger below, so the button is on the first screen. Each row is a small grid: the feature's name sits above its values, so a long value like "PDF, Word, HTML" never squeezes the label. From the sm breakpoint the name and values share one line, and from lg the price column and the ledger sit side by side. The values wrap if a chip doesn't fit, and the arrows turn around in a right-to-left layout.
How do I link the upgrade to checkout?
The call to action is a link. It's a ShineButton with render set to an a element and nativeButton={false}. Point href at your upgrade route; for a signed-in visitor, that route can start checkout for the Pro plan straight away, with their account already known.
Can it show the diff from whichever plan the visitor is on?
Yes: build UPGRADE and DIFFS from the visitor's current plan and the next one up where the page is rendered, and pass them in. Show a row only where the value really changes, and leave out what both plans share, so the list stays short enough to read.
When is a diff better than two plan cards side by side?
Use a diff when the visitor already uses the free plan and is deciding whether to upgrade: they know what they have, so seeing only what changes, row by row, answers the question. Side-by-side cards suit visitors comparing plans from scratch, who need each plan's full picture.
Related
- 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
Two Plans Pricing
Plan cardsA 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.
- 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.
- 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.
- 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.