# Hero, actions first

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

A strip across the top with the buttons on the left and a plain link on the right, then a large centred heading with its lead, and a wide picture with a caption under it.

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/hero-actions-first
  ```
- **Import**

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

Also called

- hero/actions-first

- **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 page that opens on its buttons: a strip across the top holds the actions, then a large centred heading with its lead and a wide picture. Pick `hero-centered` when the buttons belong under the heading instead.
- **Writing for it**: - Title up to 100 characters; it draws very large, so keep it to a short line.
- Description up to 200 characters, one or two lines.
- The plain link at the right of the strip is optional; leave its label empty to draw nothing.
- **Watch out for**: The buttons come before the heading, so a visitor meets the action first; use it only when the action is the point of the page. The strip runs the full width of the section and keeps its own surface colour, so it reads as a bar, not a card.

## Pairs well with

- **[Navbar, simple](/blocks/navigation/simple)**
- **[Features, alternating](/blocks/features/alternating)**
- **[Logos, grid](/blocks/logo-cloud/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 HeroActionsFirst from '@/components/klarhimmel/blocks/hero-actions-first';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroActionsFirst props={{
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#more"
          },
          "more": {
            "label": "A plain link",
            "href": "#about"
          },
          "eyebrow": "Name the topic in a few words",
          "title": "Say in one line the main idea of the page",
          "description": "Say what the page offers and who it suits, in one or two short lines.",
          "media": {
            "src": "/pictures/photo-camp1.avif",
            "alt": "Tents pitched on grass above a lake"
          },
          "caption": ""
        }} />
      </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.

- **primary**: Optional; empty is not rendered.
- **secondary**: Optional; empty is not rendered.
- **more**: Optional; empty is not rendered.
- **eyebrow**: Text, up to 40 characters.
- **title**: Text, up to 100 characters.
- **description**: Text, up to 200 characters.
- **media**: See the type.
- **caption**: Text, up to 120 characters.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/banner/floating-actions)

[Next](/blocks/hero/bento-cells)
