# Hero, floating pictures

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

A large two-line heading, its second line in the accent, a short line and a row of chips, with pictures floating around it at different sizes.

## Import

- **CLI**

  ```
  npx shadcn add https://ui.klarhimmel.com/r/hero-floating-media.json
  ```
- **Import**

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

Also called

- hero/floating-media

- **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 two-line heading over a line and a row of chips, with up to eight pictures floating around it at different sizes. Choose it for a product that is used in many ways, and `hero-split` for one clear picture.
- **Writing for it**: - Put the second line of the heading in the accent for the payoff, and keep the first line as the plain statement.
- Use each chip for one short use, such as a task a customer hands over, and leave the list empty for none.
- Order the pictures as the layout reads them, from left top around to right bottom, so the biggest ones land where the eye starts.
- **Watch out for**: The pictures float around the text only on a wide screen. On a phone they are not part of the layout in the same way, so the heading and chips must carry the message alone.

## Pairs well with

- **[Logos strip](/blocks/logo-cloud/row)**
- **[Features, grid](/blocks/features/grid)**
- **[Steps, horizontal](/blocks/steps/horizontal)**

## 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 HeroFloatingMedia from '@/components/klarhimmel/blocks/hero-floating-media';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroFloatingMedia props={{
          "title": "Name the act",
          "titleAccent": "and its range",
          "description": "Say who it is for and what they no longer have to do themselves. Then say how simply it starts.",
          "chips": [
            "Name a first use",
            "Name a second use",
            "Name a third use"
          ],
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#more"
          },
          "media": [
            {
              "src": "/pictures/photo-brk1.avif",
              "alt": "A breakfast plate of fruit with orange juice"
            },
            {
              "src": "/pictures/photo-camp1.avif",
              "alt": "Tents pitched on grass above a lake"
            },
            {
              "src": "/pictures/photo-clean1.avif",
              "alt": "A bright white kitchen with a marble island"
            }
          ]
        }} />
      </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.

- **title**: Text, up to 16 characters.
- **titleAccent**: Text, up to 16 characters.
- **description**: Text, up to 160 characters.
- **chips**: List of up to 8.
- **primary**: See the type.
- **secondary**: Optional; empty is not rendered.
- **media**: List of up to 8.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/hero/figure)

[Next](/blocks/hero/frame)
