Skip to content
Klarhimmel UI

Features, alternating

Features, alternating previewFeatures, alternating preview

Install

npx shadcn add @klarhimmel/features-split
DetailsAbout, 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

import Block from '@/components/klarhimmel/blocks/features-split';
Also called
  • 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.

Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import FeaturesSplit from '@/components/klarhimmel/blocks/features-split';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <FeaturesSplit props={{
          "eyebrow": "Name the section",
          "title": "Say what the steps lead to",
          "description": "Say in one sentence how many steps there are and what they replace.",
          "items": [
            {
              "title": "Name the first step in a few words",
              "description": "Say what happens in the first step and what the reader gets from it, in a sentence or two.",
              "points": [
                "Name a first thing it does",
                "Name a second thing it does"
              ],
              "media": {
                "src": "/pictures/photo-wed1.avif",
                "alt": "A timber barn hall dressed with white fabric and tables"
              }
            },
            {
              "title": "Name the second step",
              "description": "Say what happens in the second step and what the reader gets from it, in a sentence or two.",
              "points": [
                "Name a first thing it does",
                "Name a second thing"
              ],
              "media": {
                "src": "/pictures/scr-pricing.avif",
                "alt": "A pricing page with three plans",
                "srcDark": "/pictures/scr-pricing-dark.avif"
              }
            }
          ]
        }} />
      </BlockSurface>
    </Theme>
  );
}

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.

PropTypeDefaultDescription
eyebrowstring'Name the section'Text, up to 60 characters.
titlestring'Say what the steps lead to'Text, up to 120 characters.
descriptionstring'Say in one sentence how many steps …'Text, up to 900 characters.
mediaFirstboolean-Optional; empty is not rendered.
headerStyle'display' | 'centered' | 'heading'-One of 'display', 'centered', 'heading'. Optional; empty is not rendered.
buttonsboolean-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 itemsList 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.