# Hero, centered

- **[Sections](/blocks/)**
- **[Hero](/blocks/hero/)**
- **Hero, centered**

Centered headline, description and two actions, with a wide framed image below.

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/hero-centered
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/hero-centered';
  ```

Also called

- hero/centered

- **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**: The classic opener: centred headline, a description, two actions and a wide image below. Choose `hero-split` when the image should sit beside the text, and `hero-minimal` when there is no image.
- **Writing for it**: - The title is the h1 of the page and holds 120 characters. State what the product does for the reader rather than its category.
- Description holds 300 characters but reads as a lead paragraph, so two sentences is the useful length. The note (80) sits under the buttons for reassurance such as no card needed.
- The media field is a wide framed image and its alt text is required in the defaults, so describe what the screenshot shows.
- **Watch out for**: This block renders the page's only h1. Putting a second hero or another block with an h1 on the same page breaks the heading outline.

## Pairs well with

- **[Navbar, simple](/blocks/navigation/simple)**
- **[Logos strip](/blocks/logo-cloud/row)**
- **[Features, grid](/blocks/features/grid)**

## 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 HeroCentered from '@/components/klarhimmel/blocks/hero-centered';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroCentered 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": "#demo"
          },
          "note": "Say what makes starting easy.",
          "media": {
            "src": "/pictures/scr-calendar.avif",
            "alt": "A month calendar with one day chosen",
            "srcDark": "/pictures/scr-calendar-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.

- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 300 characters.
- **primary**: Optional; empty is not rendered.
- **secondary**: Optional; empty is not rendered.
- **note**: Text, up to 80 characters.
- **tertiary**: Optional; empty is not rendered.
- **actionsLayout**: One of 'stack', 'stagger', 'column'. Optional; empty is not rendered.
- **media**: Optional; empty is not rendered.
- **titleMedia**: Optional; empty is not rendered.
- **titleAfter**: Text, up to 120 characters. Optional; empty is not rendered.
- **titleMediaWide**: Optional; empty is not rendered.
- **actionsBelow**: Optional; empty is not rendered.
- **align**: One of 'center', 'start'. Optional; empty is not rendered.
- **titleSize**: One of 'display', 'section', 'compact'. Optional; empty is not rendered.
- **fullHeight**: Optional; empty is not rendered.
- **narrowMedia**: Optional; empty is not rendered.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/hero/card-cover)

[Next](/blocks/hero/install)
