Cards, two up


Install
npx shadcn add https://ui.klarhimmel.com/r/cards-two-up.jsonDetailsAbout, usage, props and more
A centred heading over two large dark cards side by side, each with a picture on top, a title, a line and one or two buttons; stacked on a narrow screen.
Import
Import
- cards/two-up
- Category
- Two cards side by side, each with a picture, a line and a link. New project? Set it up once: /get-started/installation.
Notes
When to use it
A centred heading over two large dark cards side by side, each with a picture, a title, a line and one or two buttons. Use it for two audiences or two offers, and features-image-cards for more.
Writing for it
- Make the two cards parallel: one for each audience or each way in, with the same shape of title and line. - Choose a picture of the offer, upright or wide, since it sits centred at the top of the card. - Say in one line what each way in gives the person and what they no longer do themselves.
Watch out for
There are exactly two cards, so a third offer needs another block. On a narrow screen they stack, and a wide picture then fills the width.
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 |
|---|---|---|---|
title | string | 'Name the choice in a line' | Text, up to 48 characters. |
cards | { title, description, media, primary, secondary }[] | 2 items | List of 2 to 2. Each item: title, description, media, primary, secondary (optional). |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |