Skip to content
Browse docs and components

Pricing

pricing

A pricing section with three tiers, a monthly and annual toggle the caller controls, and a featured tier marked by a stronger border and a small label rather than a coloured card. Each tier takes its own price, so the toggle is a few lines of your own state.

Responsive

Install

$npxshadcnadd@forme/pricing

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

PricingToggle

Controlled on purpose: the prices are the caller's to compute, so the toggle never has to know what a tier costs.

PropTypeDefaultDescription
annual*boolean—
onAnnualChange*(annual: boolean) => void—
monthlyLabelstring"Monthly"
annualLabelstring"Annual"
annualNotestring—Small note on the annual option, e.g. "Save 20%".

PricingTier

PropTypeDefaultDescription
name*string—
price*string—What the period costs, e.g. "$24".
features*string[]—
periodstring—What that price is measured in, e.g. "per seat, per month".
descriptionReactNode—
featuredbooleanfalseA stronger border and a label. Deliberately not a coloured card.
childrenReactNode—The call to action, usually a Button.

Also takes every prop of <div> attributes.

The other parts

  • PricingTakes <section> attributes
  • PricingHeaderTakes <div> attributes
  • PricingTitleTakes <h2> attributes
  • PricingDescriptionTakes <p> attributes
  • PricingGridTakes <div> attributes