Usage
import { LandingPricing } from './LandingPricing.jsx'
// Without onChoose a plan starts after a short wait. Wire it to your checkout:
<LandingPricing
locale="en"
currency="USD"
plans={plans} // [{ id, name, monthly, yearly, limit, people, points, featured? }]
compare={featureRows} // [{ name, values: [true | false | string per plan] }]
unit={['brew', 'brews']} // what the finder counts; a plan's limit is in it
steps={[10, 30, 100, 300]} // where the slider stops
finder={{ lead: 'Each month I brew', label: 'Brews a month', shared: 'For a café team', people: 3 }}
billing="yearly"
loading={!plans}
error={pricesError}
onRetry={reloadPrices}
onChoose={async (planId, billing) => (await startTrial(planId, billing)).ok}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
locale | 'en' | 'zh-CN' | 'es' | 'ja' | 'en' | Language of the built-in text, sample plans and prices. |
plans | Array<{ id, name, monthly, yearly, limit: number | null, people, points: string[], featured? }> | sample plans | The plans in order. Prices are per month; `limit` in the finder’s unit (null for no limit; `plants` is its older name) and `people` decide which plan the finder marks. |
compare | Array<{ name, values: Array<boolean | string> }> | sample rows | Rows of the comparison table, one value per plan: true, false or a short text. |
currency | string | by locale | ISO currency code of every price. |
billing | 'monthly' | 'yearly' | 'yearly' | Billing shown first. |
unit | string | [one, many] | (n) => string | plants (sample) | What the finder counts: "cups", ["seat", "seats"] or a function that writes the count. A plan’s `limit` is in this unit. |
steps | number[] | 1 … 40 | The values the finder’s slider stops at, for example [100, 500, 1000, 5000]. Without it the slider runs from `finder.min` to `finder.max`. |
finder | { title?, lead?, label?, min?, max?, step?, shared?: string | false, people? } | false | — | The finder’s words and range in one object: `lead` before the count, `label` for screen readers, `shared` the switch (false hides it; on, a plan needs `people` seats, 2 by default). false leaves the finder out and marks the plan with `featured`. |
count / shared | number / boolean | 8 / false | Where the finder starts (`plants` is the older name of `count`). |
loading | boolean | false | Shows the skeleton of the plans while prices load. |
error | boolean | string | false | Shows the error banner with a retry button; a string replaces its sentence. |
onChoose | (planId, billing) => Promise<boolean | void> | — | Starts a plan. Resolve false to keep the button; otherwise the plan shows as started. |
onBillingChange / onRetry | (billing) => void / () => void | — | The billing switch changed; the error banner’s retry was pressed. |
labels | object | — | Replaces any built-in text (keys as in copy.js). |
className | string | — | Added to the root section. |
Add it to your project
Copy the prompt into Codex or Claude Code. The agent reads the published source, shows you what it will write and adds the block together with the components it is built from.
LandingPricing.jsxlanding-pricing.csscopy.jskit.jsxkit.cssui/base-button/ui/rolling-number/ui/alert-banner/ui/success-check/ui/elastic-switch/ui/range-slider/ui/skeleton-shimmer/ui/sliding-tabs/tokens.cssREADME.md
The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.