Skip to content
Klarhimmel UI

Hero, panel tiles

Hero, panel tiles previewHero, panel tiles preview

Install

npx shadcn add https://ui.klarhimmel.com/r/hero-panel-tiles.json
DetailsAbout, usage, props and more

A calm opener: a tall white panel with a label, a big title, a lead and two actions at its foot, beside a mosaic of tiles (a picture, a number, an icon or captioned…

Import

Import

import Block from '@/components/klarhimmel/blocks/hero-panel-tiles';
Also called
  • hero/panel-tiles
About
A calm opener: a tall white panel with a label, a big title, a lead and two actions at its foot, beside a mosaic of tiles (a picture, a number, an icon or captioned pictures).
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 calm opener: a tall white panel with a title, a lead and two actions, beside a mosaic of tiles that can be pictures, numbers, icons or captioned pictures. Use hero-split for one image and a plain pitch.

Writing for it

- Mix the tile kinds on purpose: one picture, one number and one icon give the mosaic a rhythm that four pictures do not. - The first tile of kind picture spans the mosaic and the rest sit two to a row, so put the strongest photograph first. - Write the label above the title as the topic in a few words, and keep the lead to one or two sentences.

Watch out for

On a phone the panel comes first and the tiles stack under it two to a row. A mosaic with many tiles makes a long scroll before the next section, so keep the count modest.

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 HeroPanelTiles from '@/components/klarhimmel/blocks/hero-panel-tiles';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroPanelTiles props={{
          "eyebrow": "Name the topic in a few words",
          "title": "Say what the page offers in one big line",
          "description": "Say in one or two sentences what this is and who it is for.",
          "primary": {
            "label": "Name the main step",
            "href": "#start"
          },
          "secondary": {
            "label": "Name the gentler step",
            "href": "#more"
          },
          "tiles": [
            {
              "kind": "picture",
              "media": {
                "src": "/pictures/photo-factory2.avif",
                "alt": "A production line in a large industrial hall"
              }
            },
            {
              "kind": "stat",
              "value": "000+",
              "label": "Say what the figure measures"
            },
            {
              "kind": "icon",
              "icon": "clock",
              "label": "Say what the symbol means"
            }
          ]
        }} />
      </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 what the page offers in one big…'Text, up to 80 characters.
descriptionstring'Say in one or two sentences what th…'Text, up to 240 characters.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
tiles{ kind, media, value, icon, label }[]3 itemsList of 1 to 6. Each item: kind ('picture' | 'captioned' | 'stat' | 'icon'), media (optional), value (optional), 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') (optional), label (optional).
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.