Hero, floating pictures


Install
npx shadcn add https://ui.klarhimmel.com/r/hero-floating-media.jsonDetailsAbout, usage, props and more
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
Import
- 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
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | 'Name the act' | Text, up to 16 characters. |
titleAccent | string | 'and its range' | Text, up to 16 characters. |
description | string | 'Say who it is for and what they no …' | Text, up to 160 characters. |
chips | string[] | 4 items | List of up to 8. |
primary | Link | {…} | See the type. |
secondary | Link | {…} | Optional; empty is not rendered. |
media | Media[] | 8 items | List of up to 8. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |