Features, stacked cards


Install
npx shadcn add https://ui.klarhimmel.com/r/features-stacked-cards.jsonDetailsAbout, usage, props and more
An intro column (eyebrow, heading, lead, two actions) pinned beside a tall column of picture cards, each with a badge, name and line.
Import
Import
- features/stacked-cards
- About
- An intro column (eyebrow, heading, lead, two actions) pinned beside a tall column of picture cards, each with a badge, name and line. On a phone the intro sits above the stacked cards.
- Category
- What it does, as a grid, a list, tabs or alternating rows. New project? Set it up once: /get-started/installation.
Notes
When to use it
An intro column with a heading, lead and two actions pinned beside a tall column of picture cards that each carry a badge, a name and a line. Use features-image-cards when the cards should sit in a grid.
Writing for it
- Let the intro say why the items belong together, in one or two short lines, since it stays in view while the cards scroll past. - Give each card a badge, a name and one line. The picture does most of the work, so choose images of the same kind. - Keep the number of cards modest, because the column is tall and the intro only stays pinned beside it.
Watch out for
On a phone the intro sits above the stacked cards and nothing is pinned. A long column of cards then reads as a plain list, so check the first screen still makes the point.
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 group in two or three words' | Text, up to 40 characters. |
title | string | 'Say what this group of items is abo…' | Text, up to 100 characters. |
description | string | 'Open with one or two short lines th…' | Text, up to 240 characters. |
primary | Link | {…} | See the type. |
secondary | Link | {…} | Optional; empty is not rendered. |
items | { badge, title, description, media }[] | 4 items | List of 2 to 6. Each item: badge, title, description, media. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |