Skip to content
Klarhimmel UI

Hero, framed screenshot

Hero, framed screenshot previewHero, framed screenshot preview

Install

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

Centred headline and actions above a product screenshot in a window frame with a title bar.

Import

Import

import Block from '@/components/klarhimmel/blocks/hero-frame';
Also called
  • hero/frame
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 centred opener where the image is a product screenshot placed inside a window frame that bleeds off the bottom edge. Use hero-centered for a plain framed image, or hero-terminal for a command line product.

Writing for it

- The frameTitle holds 60 characters and appears in the window bar like a page title or file name. It is optional and shows a placeholder only while editing. - Media is shown at 16 to 9, so crop the screenshot to that ratio before uploading; a taller image will be cut. - The title holds 120 characters. With a large screenshot below, a shorter title of about six words reads better.

Watch out for

The frame has no bottom border and the section has no bottom padding, so the next block starts right against the screenshot. Follow it with a block that has its own top spacing.

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroFrame props={{
          "eyebrow": "Name what this is",
          "title": "Say what the visitor gets in one line",
          "description": "Say in one or two sentences what it does, who it is for and what the visitor can do next, in plain words.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#tour"
          },
          "frameTitle": "your-app.example/home",
          "media": {
            "src": "/pictures/scr-shell.avif",
            "alt": "An app shell with a side menu",
            "srcDark": "/pictures/scr-shell-dark.avif"
          }
        }} />
      </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 120 characters.
descriptionstring'Say in one or two sentences what it…'Text, up to 300 characters.
primaryLink{…}Optional; empty is not rendered.
secondaryLink{…}Optional; empty is not rendered.
frameTitlestring'your-app.example/home'Text, up to 60 characters.
mediaMedia{…}See the type.
fold'auto' | 'straddle'-One of 'auto', 'straddle'. Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.