Pricing, comparison table


Install
npx shadcn add @klarhimmel/pricing-comparisonDetailsAbout, usage, props and more
A feature-by-plan table for two to four plans. Cells show a check ("yes"), a dash ("no") or short text.
Import
Import
- pricing/comparison
- Category
- Plans and prices: tiers, a single plan, a toggle or a comparison table. New project? Set it up once: /get-started/installation.
Notes
When to use it
A feature-by-plan table for two to four plans, with checks, dashes or short text in the cells. It follows plan cards such as pricing-tiers; do not use it to introduce a price on its own.
Writing for it
- In the values (30 characters each), 'yes' draws a check, 'no' or empty draws a dash, and any other text is shown as it is, like '5 seats' or 'Unlimited'. - List the values in plan order, one per plan. A row with fewer values than plans shows dashes for the plans left out. - Feature names hold 80 characters and are the row headers. Group them so the rows a buyer cares about most come first, up to sixteen rows.
Watch out for
The first column header is read by screen readers only, defaulting to 'Feature'. On a Swedish or other non-English page set featureLabel yourself, as the icon cells also speak the English words 'Included' and 'Not included'.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Name the section' | Text, up to 60 characters. |
title | string | 'Say what the table compares' | Text, up to 120 characters. |
description | string | 'Say in one sentence what every plan…' | Text, up to 300 characters. |
align | 'start' | 'center' | - | One of 'start', 'center'. Optional; empty is not rendered. |
featureLabel | string | - | Text, up to 30 characters. Optional; empty is not rendered. |
plans | { name, featured }[] | 3 items | List of 2 to 4. Each item: name, featured. |
rows | { feature, values }[] | 11 items | List of 1 to 16. Each item: feature, values. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |