Skip to content
Klarhimmel UI

Hero, two by two

Hero, two by two previewHero, two by two preview

Install

npx shadcn add @klarhimmel/hero-split-grid
DetailsAbout, usage, props and more

A two-by-two grid: the heading and lead top left, a picture top right, a short paragraph with the buttons bottom left and a second picture bottom right.

Import

Import

import Block from '@/components/klarhimmel/blocks/hero-split-grid';
Also called
  • hero/split-grid
About
A two-by-two grid: the heading and lead top left, a picture top right, a short paragraph with the buttons bottom left and a second picture bottom right. One column on a phone, in reading order.
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

A two-by-two opening: the heading and lead top left, a picture top right, a short paragraph with the buttons below it and a second picture bottom right. For one picture use hero-split.

Writing for it

- Title up to 100 characters, lead up to 200, the paragraph beside the buttons up to 200. - The first picture takes a caption up to 120 characters; the second has none. - Two buttons at most.

Watch out for

The grid reads in rows, left to right, so the paragraph and buttons on the left answer the heading above them, not the picture beside them. On a phone everything stacks in that order, so the two pictures are separated by text.

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 HeroSplitGrid from '@/components/klarhimmel/blocks/hero-split-grid';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroSplitGrid props={{
          "eyebrow": "Name the topic in a few words",
          "title": "Say in one line what the visitor gets",
          "description": "Say what the page offers and who it suits, in one or two short lines.",
          "media": {
            "src": "/pictures/photo-optic1.avif",
            "alt": "Silver-framed glasses on a white table"
          },
          "caption": "Say what the picture shows.",
          "body": "Say in a sentence what happens next for the visitor.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#more"
          },
          "closing": {
            "src": "/pictures/photo-party1.avif",
            "alt": "A party table with a cake and balloons"
          }
        }} />
      </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 topic in a few words'Text, up to 40 characters.
titlestring'Say in one line what the visitor ge…'Text, up to 100 characters.
descriptionstring'Say what the page offers and who it…'Text, up to 200 characters.
mediaMedia{…}See the type.
captionstring'Say what the picture shows.'Text, up to 120 characters.
bodystring'Say in a sentence what happens next…'Text, up to 200 characters.
primaryLink{…}Optional; empty is not rendered.
secondaryLink{…}Optional; empty is not rendered.
closingMedia{…}See the type.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.