# Pricing, comparison table

- **[Sections](/blocks/)**
- **[Pricing](/blocks/pricing/)**
- **Pricing, comparison table**

A feature-by-plan table for two to four plans. Cells show a check ("yes"), a dash ("no") or short text.

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/pricing-comparison
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/pricing-comparison';
  ```

Also called

- 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

- **[Pricing, three tiers](/blocks/pricing/tiers)**
- **[FAQ, list](/blocks/faq/accordion)**
- **[Call to action, minimal](/blocks/cta/minimal)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import PricingComparison from '@/components/klarhimmel/blocks/pricing-comparison';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <PricingComparison props={{
          "eyebrow": "Name the section",
          "title": "Say what the table compares",
          "description": "Say in one sentence what every plan has and what the higher plans add.",
          "plans": [
            {
              "name": "First plan",
              "featured": false
            },
            {
              "name": "Second plan",
              "featured": true
            },
            {
              "name": "Third plan",
              "featured": false
            }
          ],
          "rows": [
            {
              "feature": "Name a feature",
              "values": [
                "0",
                "A value",
                "A value"
              ]
            },
            {
              "feature": "Name a feature",
              "values": [
                "0",
                "A value",
                "A value"
              ]
            },
            {
              "feature": "Name a feature",
              "values": [
                "00 days",
                "A value",
                "A value"
              ]
            }
          ]
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## 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.

- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 300 characters.
- **align**: One of 'start', 'center'. Optional; empty is not rendered.
- **featureLabel**: Text, up to 30 characters. Optional; empty is not rendered.
- **plans**: List of 2 to 4. Each item: name, featured.
- **rows**: List of 1 to 16. Each item: feature, values.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/pricing/bar)

[Next](/blocks/pricing/featured)
