Skip to content
Klarhimmel UI

Hero, split mosaic

Hero, split mosaic previewHero, split mosaic preview

Install

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

Two unequal columns of cells: the text, a small picture and the actions down the wide left column, and a tall picture over a card of two figures in the right column.

Import

Import

import Block from '@/components/klarhimmel/blocks/hero-split-mosaic';
Also called
  • hero/split-mosaic
About
Two unequal columns of cells: the text, a small picture and the actions down the wide left column, and a tall picture over a card of two figures in the right column. On a phone it is one column in reading order without the tall picture.
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 unequal columns of cells: text, a small picture and the actions on the wide left, a tall picture over a card of two figures on the right. For text beside one picture use hero-split.

Writing for it

- Title up to 100 characters, lead up to 200, an optional paragraph up to 300. - The small picture takes a caption up to 120 characters. - Two figures at most, each a value up to 20 characters and a label up to 60.

Watch out for

The tall picture only draws from a wide container up; a phone shows the text, the small picture, the actions and the figures. Leave the figures out when you have no real numbers, rather than inventing them.

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroSplitMosaic 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.",
          "body": "Say in two or three lines what the visitor needs to know before they act.",
          "media": {
            "src": "/pictures/photo-brk1.avif",
            "alt": "A breakfast plate of fruit with orange juice"
          },
          "inset": {
            "src": "/pictures/photo-camp1.avif",
            "alt": "Tents pitched on grass above a lake"
          },
          "caption": "Say what the picture shows.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#more"
          },
          "more": {
            "label": "A plain link",
            "href": "#about"
          },
          "stats": [
            {
              "value": "00",
              "label": "Say what the first number counts"
            },
            {
              "value": "000+",
              "label": "Say what the second number counts"
            }
          ]
        }} />
      </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.
bodystring'Say in two or three lines what the …'Text, up to 300 characters.
mediaMedia{…}See the type.
insetMedia{…}See the type.
captionstring'Say what the picture shows.'Text, up to 120 characters.
primaryLink{…}Optional; empty is not rendered.
secondaryLink{…}Optional; empty is not rendered.
moreLink{…}Optional; empty is not rendered.
stats{ value, label }[]2 itemsList of up to 2. Each item: value, label. Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.