Comparison, who it is for


Install
npx shadcn add https://ui.klarhimmel.com/r/comparison-cards.jsonDetailsAbout, usage, props and more
Two or three cards that each say who a choice is right for ("Choose us if", "Choose a spreadsheet if") with a few reasons, and an optional honest closing line.
Import
Import
- comparison/cards
- About
- Two or three cards that each say who a choice is right for ("Choose us if", "Choose a spreadsheet if") with a few reasons, and an optional honest closing line. For comparisons where the answer depends on the reader, not a feature count.
- Category
- How it differs from the alternatives: a table that says yes, no or partly in words. New project? Set it up once: /get-started/installation.
Notes
When to use it
Two or three cards that each say who a choice is right for, with a closing line that admits when the alternative wins. For a dense feature matrix, use comparison-table.
Writing for it
- The first card is yours and the others are the alternatives. Head each with a phrase that starts the sentence, such as Choose us if, and let the points finish it. - Each card takes two to four points of 100 characters. Keep them to facts the reader can check about their own situation. - The closing line holds 200 characters. It is the part that earns trust, so write the case where you are not the right answer.
Watch out for
Card headings are h3 under the block title. If you drop the title the cards lose their parent heading, so keep a title when the block sits alone on a page.
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 topic' | Text, up to 60 characters. |
title | string | 'Say how to choose' | Text, up to 120 characters. |
description | string | 'Say honestly what the choice depend…' | Text, up to 300 characters. |
cards | { heading, points }[] | 3 items | List of 2 to 3. Each item: heading, points. |
honest | string | 'Say honestly when another option is…' | Text, up to 200 characters. Optional; empty is not rendered. |
cta | Link | {…} | See the type. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |