Pricing Plans
The pricing section of a landing page, with an honest annual saving.
PROGet Pricing Plans and 168 other Pro components with pro lifetime — Get Pro
- Category
- Marketing
- Access
- ProPro · unlocked
- Source
- 840 lines · one file
- States
- 7 drawn
- Added
- 21 Oct 2026
The decision inside it
The saving is money, not a percentage
On the annual view a plan reads "$24.00 /month" over "billed $288 yearly · save $60", worked out from the two prices you pass, so the claim is always arithmetic. The price rolls when you switch and the plans never change height.
When to use it
Use Pricing Plans for the pricing section of a marketing page: monthly and annual prices with the real saving in money, a raised popular plan, an enterprise Contact us plan and an optional comparison table. Amounts are integer cents. For changing plans inside the product use Plan Picker.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Pricing Plans for this.
Install it: npx shadcn@latest add @liro/pricing-plans
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/pricing-plans.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { PricingPlans, type PricingPlan } from "@/components/ui/pricing-plans";
const plans: PricingPlan[] = [
{ id: "starter", name: "Starter", blurb: "For one person", monthly: 0, features: ["3 documents a month", "Email support"] },
{ id: "team", name: "Team", blurb: "For growing teams", monthly: 2900, yearly: 28800, unit: "per seat", features: ["Unlimited documents", "Templates"] },
{ id: "enterprise", name: "Enterprise", contact: true, href: "/contact", features: ["SSO", "Audit log"] },
];
export function Pricing() {
return (
<PricingPlans
heading="Simple pricing for every team"
plans={plans}
popular="team"
onSelect={(id, { interval }) => window.location.assign(`/signup?plan=${id}&interval=${interval}`)}
/>
);
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
plans | PricingPlan[] | Yes | – |
heading | React.ReactNode | No | – |
subheading | React.ReactNode | No | – |
popular | string | No | The plan to raise as the white card. |
popularLabel | string | No | Default "Most popular". |
interval | PricingInterval | No | – |
defaultInterval | PricingInterval | No | – |
onIntervalChange | (interval: PricingInterval) => void | No | – |
currencies | string[] | No | ISO codes. The first is the one `monthly` / `yearly` are in. Two or more show a switch. |
currency | string | No | – |
defaultCurrency | string | No | – |
onCurrencyChange | (currency: string) => void | No | – |
locale | string | No | BCP 47, for separators. Default `en-US`. |
comparison | ComparisonGroup[] | No | – |
comparisonOpen | boolean | No | – |
defaultComparisonOpen | boolean | No | – |
onComparisonOpenChange | (open: boolean) => void | No | – |
onSelect | (planId: string, choice: { interval: PricingInterval; currency: string }) => void | Promise<void> | No | May return a promise. |
footnote | React.ReactNode | No | Small print under the tray. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themeStates
All of them are drawn by the component. None is left for you to design.
- Monthly
- Annually
- Four plans
- Contact plan
- Comparison open
- Currency switched
- Selecting
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances