Skip to content
Klarhimmel UI

Content, text and perks card

Content, text and perks card previewContent, text and perks card preview

Install

npx shadcn add https://ui.klarhimmel.com/r/content-split-text.json
DetailsAbout, usage, props and more

A heading and a few short paragraphs on the left, a bordered card on the right with up to four icon, title and description points.

Import

Import

import Block from '@/components/klarhimmel/blocks/content-split-text';
Also called
  • content/split-text
About
A heading and a few short paragraphs on the left, a bordered card on the right with up to four icon, title and description points. On a phone the card sits under the text and each icon sits above its title.
Category
Long-form text and timelines for about and policy pages. New project? Set it up once: /get-started/installation.

Notes

When to use it

A heading and a few short paragraphs on the left, with a bordered card at the right that holds up to four points with an icon, a title and a description. Use content-columns when there is no card.

Writing for it

- Write the paragraphs for one idea. Blank lines draw as paragraph gaps, so two or three short ones read best. - Use the card for what the reader gets, one point per icon, and keep each description to a sentence. - Pick icons that say what the point is, since they sit beside each title.

Watch out for

On a phone the card sits under the text and each icon moves above its title. More than four points cannot be added, so choose the four that matter.

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 ContentSplitText from '@/components/klarhimmel/blocks/content-split-text';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContentSplitText props={{
          "title": "Name the place or the idea",
          "body": "Say in two sentences how the service works and what the customer does first.\n\nSay in two or three sentences where it is, what is near and what the customer can do there.\n\nSay in one sentence how to reach you with a question.",
          "items": [
            {
              "icon": "clock",
              "title": "Name the first perk",
              "description": "Say what the customer gets and what they no longer have to do, in a sentence."
            },
            {
              "icon": "globe",
              "title": "Name the second perk",
              "description": "Say what the customer gets and what they no longer have to do, in a sentence."
            },
            {
              "icon": "heart",
              "title": "Name the third perk",
              "description": "Say what the customer gets and what they no longer have to do, in a sentence."
            }
          ]
        }} />
      </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
titlestring'Name the place or the idea'Text, up to 80 characters.
bodystring'Say in two sentences how the servic…'Text, up to 900 characters.
items{ icon, title, description }[]3 itemsList of 1 to 4. Each item: icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge'), title, description.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.