Plan Picker
Changing plan, with a monthly and yearly toggle and the money written out before anyone commits — $90.67 today for the rest of this period, then $249 on 14 Oct. Downgrades show the credit. Plans the team has outgrown refuse and say why.
The decision inside it
Your backend quotes, the picker never does the arithmetic
Proration rules differ by processor and by contract. The picker asks a quote function you supply and prints what comes back, so the number under the button is the number on the invoice.
Installation
How you get it
One command. The CLI writes the file into components/ui/ and installs what it needs.
npx shadcn@latest add https://layropro.com/r/plan-pickerAPI
“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.
| Prop | Type | Notes |
|---|---|---|
plansrequired | PickerPlan[] | — |
currentPlanIdrequired | string | — |
currentInterval | BillingInterval | — |
defaultSelected | string | Which plan opens selected. Default: the current one. Set it when the picker is opened from an "Upgrade" button, so the customer lands on the plan they clicked with its charge already printed. |
quoterequired | (planId: string, interval: BillingInterval) => PlanQuote | Asked on every selection. Synchronous: fetch quotes up front, not on click. |
onConfirm | (planId: string, interval: BillingInterval, quote: PlanQuote) => void | — |
currency | string | — |
locale | string | — |
title | string | — |
footnote | string | Small print under the button. Default states that tax is extra. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLayro foundations, installed alongside it
layro-themesegmented-controlLifetime access
Every component, and everything we ship next.
- All 65 components, source included
- The template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.
More in Billing
Subscription Status
PaidSix states, each with the date it depends on — and cancelled is not expired.
Included with lifetime access
Invoice History
FreeThe next invoice as a dashed estimate above the record, and notes for odd amounts.
Payment Methods
PaidCards on file that warn about the renewal they will miss, not just the expiry date.
Included with lifetime access