Skip to content
English

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

PropTypeDefaultWhat it does
locale'en' | 'zh-CN' | 'es' | 'ja''en'Language of the built-in text, sample plans and prices.
plansArray<{ id, name, monthly, yearly, limit: number | null, people, points: string[], featured? }>sample plansThe 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.
compareArray<{ name, values: Array<boolean | string> }>sample rowsRows of the comparison table, one value per plan: true, false or a short text.
currencystringby localeISO currency code of every price.
billing'monthly' | 'yearly''yearly'Billing shown first.
unitstring | [one, many] | (n) => stringplants (sample)What the finder counts: "cups", ["seat", "seats"] or a function that writes the count. A plan’s `limit` is in this unit.
stepsnumber[]1 … 40The 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 / sharednumber / boolean8 / falseWhere the finder starts (`plants` is the older name of `count`).
loadingbooleanfalseShows the skeleton of the plans while prices load.
errorboolean | stringfalseShows 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.
labelsobject—Replaces any built-in text (keys as in copy.js).
classNamestring—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.