Skip to content
Klarhimmel UI

Hero, minimal

Hero, minimal previewHero, minimal preview

Install

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

Oversized headline, one line of description and a single link, left-aligned or centred, optionally filling the screen. No media.

Import

Import

import Block from '@/components/klarhimmel/blocks/hero-minimal';
Also called
  • hero/minimal
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 text-only opener with a headline, a sentence and one action, for pages where words carry the message. If you have an image or a second action to offer, take hero-centered or hero-split.

Writing for it

- Here the title allows 160 characters, longer than other heroes, which makes room for a full statement of position instead of a slogan. - There is only one link field, primary. Make its label a verb phrase about what happens next, such as Book a call. - The description holds 300 characters, and with no image it is what keeps the page from feeling empty, so name a concrete detail.

Watch out for

The primary button disappears when its label is empty, and there is no secondary action to fall back on, so a cleared label leaves a hero with no way forward.

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 HeroMinimal from '@/components/klarhimmel/blocks/hero-minimal';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroMinimal props={{
          "eyebrow": "Name what this is",
          "title": "Say what the visitor gets in one line",
          "description": "Say in one sentence what it does and who it is for, plainly.",
          "primary": {
            "label": "Main action",
            "href": "#work"
          }
        }} />
      </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 what this is'Text, up to 60 characters.
titlestring'Say what the visitor gets in one li…'Text, up to 160 characters.
descriptionstring'Say in one sentence what it does an…'Text, up to 300 characters.
primaryLink{…}Optional; empty is not rendered.
secondaryLink-Optional; empty is not rendered.
width'wide' | 'narrow'-One of 'wide', 'narrow'. Optional; empty is not rendered.
align'start' | 'center'-One of 'start', 'center'. Optional; empty is not rendered.
height'auto' | 'screen'-One of 'auto', 'screen'. Optional; empty is not rendered.
tiles{ name, description, href, media }[]-List of up to 4. Each item: name, description, href, media (optional). Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.