Skip to main content
PlanComparison renders your plans as columns and what they include as rows, so customers see the real difference between plans. When to use
  • Below the plan cards of a PricingTable on a pricing page.
  • A “compare plans” page or dialog.
PlanComparison of Free, Pro and Scale with rows for API calls, seats and AI credits, light theme

Importing PlanComparison

Rendering PlanComparison

Pass the plans; the table builds one column per plan and one row per entitlement and per granted credit system:
components/compare-plans.tsx
Each column shows the plan’s name and price, cheapest first. A cell shows a check for an included feature, the limit or value where there is one, and a cross where a plan does not have it. A wide table scrolls sideways inside its frame.

Data

The table needs plans in the PricingPlan shape the public catalog returns. The rows come from their entitlements and credit_grant_rules:

Live data

Pass the plans of usePlans. comparisonRows(plans) returns the generated rows, so you can add or remove rows before passing them as features:

Data from the API

Generated row keys are entitlement:<feature code> and credit:<credit system code>. A cell shows:

Examples

Your own rows

Pass features to write the rows yourself. values is keyed by plan code; true shows a check, false a cross, and a string is shown as written.

Your own column order

sort orders the columns, for example most expensive first.

API reference

PricingPlan[]
required
The plans to compare. The rows are built from their entitlements and credit_grant_rules.
ComparisonFeature[]
Replaces the rows. Each row is { key, label, values }; values maps a plan code to true, false or a string. A plan missing from values shows —. Defaults to comparisonRows(plans).
(a: PricingPlan, b: PricingPlan) => number
Orders the columns. Defaults to cheapest first with sortPlansByPrice: by base price, with plans in different currencies grouped.
Appearance
Theme, variables and element overrides. Defaults to the provider’s. See Appearance.

States

The table shows Powered by Nozle below it.

Appearance

planComparison (root), planComparison__table, planComparison__row, planComparison__cell (header and body cells).Style them with appearance.elements. See Elements.

PricingTable

Plan cards with checkout.

PlanCard

One plan card for your own layout.