Hero, twin pictures


Install
npx shadcn add @klarhimmel/hero-twin-picturesDetailsAbout, usage, props and more
Two columns side by side, each with a label, a heading, a picture with a caption and a name line, then one ruled row under both with a plain link on the left and the…
Import
Import
- hero/twin-pictures
- About
- Two columns side by side, each with a label, a heading, a picture with a caption and a name line, then one ruled row under both with a plain link on the left and the buttons on the right. The columns stack on a phone.
- Category
- The first screen: what it is, who it is for, what to do next. New project? Set it up once: /get-started/installation.
Notes
When to use it
Two subjects side by side, each with its own heading and picture, closed by one ruled row with a link and the buttons. For one picture beside text use hero-split.
Writing for it
- Each column has a label up to 40 characters, a title up to 100, a caption up to 120 and a name line up to 80. - Both columns need a picture; the credit line suits a person or a place. - The closing row takes a plain link and up to two buttons.
Watch out for
The two columns are equal and the headings should be about the same length, or one column ends lower than the other. The block has no single section heading: the first column's title is the one a screen reader announces first.
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 |
|---|---|---|---|
columns | { eyebrow, title, media, caption, credit, action, actionStyle }[] | 2 items | List of 2 to 2. Each item: eyebrow, title, media, caption, credit, action (optional), actionStyle ('primary' | 'secondary') (optional). |
more | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
primary | Link | {…} | Optional; empty is not rendered. |
titleSize | 'title' | - | One of 'title'. Optional; empty is not rendered. |