Features, alternating


Install
npx shadcn add @klarhimmel/features-splitDetailsAbout, usage, props and more
Feature rows with copy beside an image, alternating sides. Each row has a title, description and up to four points.
Import
Import
- features/alternating
- 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
Alternating rows of text and image, each row covering one feature in depth with a few bullet points. Use it for a walk through the three or four things that matter; features-tabs does the same in less height.
Writing for it
- Each item has a title (80), a description (300), up to four points of 80 characters, and a media image. The points should be facts, not repeats of the description. - One to four items are allowed. Each row title is its own h3, so keep it to a short phrase. - Keep image proportions the same across rows, because the rows are placed side by side and uneven pictures show.
Watch out for
The points array can be empty, but the media slot still draws. An item with no points and no image is a block of text next to a blank frame.
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 section' | Text, up to 60 characters. |
title | string | 'Say what the steps lead to' | Text, up to 120 characters. |
description | string | 'Say in one sentence how many steps …' | Text, up to 900 characters. |
mediaFirst | boolean | - | Optional; empty is not rendered. |
headerStyle | 'display' | 'centered' | 'heading' | - | One of 'display', 'centered', 'heading'. Optional; empty is not rendered. |
buttons | boolean | - | Optional; empty is not rendered. |
stackOrder | 'alternate' | - | One of 'alternate'. Optional; empty is not rendered. |
rowTitleSize | 'heading' | 'title' | - | One of 'heading', 'title'. Optional; empty is not rendered. |
rowStyle | 'ruled' | - | One of 'ruled'. Optional; empty is not rendered. |
actions | { primary, secondary } | - | Fields: primary (optional), secondary (optional). Optional; empty is not rendered. |
items | { title, description, points, link, media, badge, link2, stats, caption, quote, | 3 items | List of 1 to 4. Each item: title, description, points, link (optional), media, badge (optional), link2 (optional), stats (optional), caption (optional), quote (optional), price (optional). |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |