Skip to content
Klarhimmel UI

Hero, picture over a foot row

Hero, picture over a foot row previewHero, picture over a foot row preview

Install

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

A large picture across the top, then a foot row with a label, a heading and a short line on one side and the actions on the other.

Import

Import

import Block from '@/components/klarhimmel/blocks/hero-media-foot';
Also called
  • hero/media-foot
About
A large picture across the top, then a foot row with a label, a heading and a short line on one side and the actions on the other. On a phone the foot stacks under the picture, text first and actions last.
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 large picture across the top with a foot row under it: a label, a heading and a line on one side, the actions on the other. Choose hero-header-row when the words should come before the picture.

Writing for it

- Pick the picture height for the page: wide is a 21 to 9 band, tall a 16 to 10 picture and screen fills most of the window. - Set the actions to split to put them beside the text on a wide screen, or stacked to put them under it. - Keep the label to two or three words and the heading to one line, so the foot reads in one glance.

Watch out for

The screen height setting makes the picture dominate, and the foot may drop below the fold on a short window. Use it when the picture is the offer, not as a default.

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 HeroMediaFoot from '@/components/klarhimmel/blocks/hero-media-foot';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroMediaFoot props={{
          "look": "wide",
          "foot": "split",
          "media": {
            "src": "/pictures/photo-salon2.avif",
            "alt": "A salon interior in black and white with chairs and mirrors"
          },
          "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 two short lines.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#more"
          }
        }} />
      </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
look'wide' | 'tall' | 'screen''wide'One of 'wide', 'tall', 'screen'.
foot'split' | 'stacked''split'One of 'split', 'stacked'.
mediaMedia{…}See the type.
eyebrowstring'Name the topic in a few words'Text, up to 40 characters. Optional; empty is not rendered.
titlestring'Say in one line what the visitor ge…'Text, up to 80 characters.
descriptionstring'Say what the page offers and who it…'Text, up to 200 characters.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.