Three blocks for a pricing page: plan cards that line up whatever their content (or a split layout with one wide featured card and an audience switch), a comparison table with a sticky header and counted rows, and an FAQ.
Examples
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- PricingPlans · plans
PricingPlan[]- { id, name, description?, badge?, price, featured?, cta: { label, href? | onClick?, variant?, disabled?, hint? }, highlights?: { icon?, label, value }[], featuresTitle?, features?: { label, included?, tooltip? }[], footnote? }. All cards share one subgrid, so names, prices, buttons, highlights and lists line up; the featured card gets an accent edge and glow and comes first when stacked. cta.disabled shows the button without an action (e.g. "Included in your plan"); cta.hint is one short line under it.
- PricingPlans · price
{ amount, was?, per?, note? }|Record<billing, …>- One price, or one per billing option. was is struck through (with “was” for screen readers).
- PricingPlans · billing
{ options: { value, label, badge? }[], value?, defaultValue?, onValueChange? }- SegmentedControl above the cards (e.g. Monthly / Yearly with “save 20%”); prices update politely. savePercent("$29", "$278") → 20 helps write the badge.
- accent
CSS colour- Default
"#6366f1" - Featured edge, glow, checks and badges (also on PricingCompare).
- PricingCompare · plans / groups
{ id, name, price?, cta?: { label, href? | onClick?, disabled? }, featured? }[] / { title, rows: { label, tooltip?, values } }[]- values per plan id: true ✓, false –, or text. Wide (≥720px container): a table with a sticky plan header and the featured column tinted. Narrow: one accordion item per plan.
- PricingCompare · stickyTop / differencesToggle / caption
px / boolean / string- Default
0 / false / “Compare plans” - Header offset under your top bar; a switch to hide rows that are the same everywhere; the table caption (screen readers).
- PricingFaq · items
{ id?, question, answer }[]- On the Knowns Accordion (keyboard ↑ ↓ between questions). title / description on the left when there's room; defaultOpen ids.
| Prop | Type | Default | Description |
|---|---|---|---|
| PricingPlans · plans | PricingPlan[] | - | { id, name, description?, badge?, price, featured?, cta: { label, href? | onClick?, variant?, disabled?, hint? }, highlights?: { icon?, label, value }[], featuresTitle?, features?: { label, included?, tooltip? }[], footnote? }. All cards share one subgrid, so names, prices, buttons, highlights and lists line up; the featured card gets an accent edge and glow and comes first when stacked. cta.disabled shows the button without an action (e.g. "Included in your plan"); cta.hint is one short line under it. |
| PricingPlans · price | { amount, was?, per?, note? } | Record<billing, …> | - | One price, or one per billing option. was is struck through (with “was” for screen readers). |
| PricingPlans · billing | { options: { value, label, badge? }[], value?, defaultValue?, onValueChange? } | - | SegmentedControl above the cards (e.g. Monthly / Yearly with “save 20%”); prices update politely. savePercent("$29", "$278") → 20 helps write the badge. |
| accent | CSS colour | "#6366f1" | Featured edge, glow, checks and badges (also on PricingCompare). |
| PricingCompare · plans / groups | { id, name, price?, cta?: { label, href? | onClick?, disabled? }, featured? }[] / { title, rows: { label, tooltip?, values } }[] | - | values per plan id: true ✓, false –, or text. Wide (≥720px container): a table with a sticky plan header and the featured column tinted. Narrow: one accordion item per plan. |
| PricingCompare · stickyTop / differencesToggle / caption | px / boolean / string | 0 / false / “Compare plans” | Header offset under your top bar; a switch to hide rows that are the same everywhere; the table caption (screen readers). |
| PricingFaq · items | { id?, question, answer }[] | - | On the Knowns Accordion (keyboard ↑ ↓ between questions). title / description on the left when there's room; defaultOpen ids. |
Split layout with an audience switch
One switch for who is buying instead of a card per audience: the plain plan stays narrow, the featured plan takes the wide card with its price and button beside what it includes, and the billing switch sits inside it. Keep the choice in the URL with onValueChange. The compare table follows the same choice and links each counted row to what it counts.
- PricingPlans · layout
"grid"|"split"- Default
"grid" - split: plain plans as narrow cards beside one wide featured card (price and button on the left, highlights and features as hairline rows on the right). Stacks below a ~860px container, featured first.
- PricingPlans · audience
{ options: { value, label, hint? }[], value?, defaultValue?, onValueChange? }- A switch above the cards; a plan with audience: string[] shows only for those values, a plan without one always. Controlled or not; write the value to the URL in onValueChange.
- PricingPlans · billing.placement
"above"|"featured"- Default
"above" - featured: the billing switch sits in the head of the featured card that bills by option (a keyed price, or plan.billing).
- PricingPlan · audience / billing / aside
string[] / string[] / ReactNode- Which audiences and billing options a plan is sold under (a monthly plan can take the lifetime card's place); aside is a short line at the right of a split card's head when it has no switch.
- PricingTrust · items
ReactNode[]- Short facts with a check under the headline. Facts only: no endorsements you do not have.
- PricingCompare · row.href / previewLabel / narrow
string / string / "accordion"|"table"- Default
- / "Preview" / "accordion" - A Preview link beside a counted row; narrow="table" keeps a compact table on phones for two or three plans (the header buttons hide there, the cards above carry them).
| Prop | Type | Default | Description |
|---|---|---|---|
| PricingPlans · layout | "grid" | "split" | "grid" | split: plain plans as narrow cards beside one wide featured card (price and button on the left, highlights and features as hairline rows on the right). Stacks below a ~860px container, featured first. |
| PricingPlans · audience | { options: { value, label, hint? }[], value?, defaultValue?, onValueChange? } | - | A switch above the cards; a plan with audience: string[] shows only for those values, a plan without one always. Controlled or not; write the value to the URL in onValueChange. |
| PricingPlans · billing.placement | "above" | "featured" | "above" | featured: the billing switch sits in the head of the featured card that bills by option (a keyed price, or plan.billing). |
| PricingPlan · audience / billing / aside | string[] / string[] / ReactNode | - | Which audiences and billing options a plan is sold under (a monthly plan can take the lifetime card's place); aside is a short line at the right of a split card's head when it has no switch. |
| PricingTrust · items | ReactNode[] | - | Short facts with a check under the headline. Facts only: no endorsements you do not have. |
| PricingCompare · row.href / previewLabel / narrow | string / string / "accordion" | "table" | - / "Preview" / "accordion" | A Preview link beside a counted row; narrow="table" keeps a compact table on phones for two or three plans (the header buttons hide there, the cards above carry them). |
When to use
When to use
- A pricing section with two to four plans whose names, prices, buttons and features line up across cards.
- Monthly and yearly billing with a savings badge and one featured plan.
When not to use
- Showing a user's current usage against their plan: use Usage Meter.
- More than four plans: the cards get narrow; use a comparison table instead.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Pricing to my app and wire it to my own data.
- I need a pricing section with two to four plans whose names, prices, buttons and features line up across cards. Set that up with the Knowns UI Pricing.
- Which Pricing props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "pricing-plans" }) and search_docs({ query: "pricing" }). Pro props, full examples and source come back once your license key is in the MCP config.