Hero, diagonal


Install
npx shadcn add @klarhimmel/hero-diagonalDetailsAbout, usage, props and more
Three steps down a diagonal on a wide screen: a large heading with its lead at the top left, the actions on a row in the middle, offset to the right, and a picture at…
Import
Import
- hero/diagonal
- About
- Three steps down a diagonal on a wide screen: a large heading with its lead at the top left, the actions on a row in the middle, offset to the right, and a picture at the lower right. One column on a phone.
- 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 bold opening that steps down the page: a very large heading top left, the actions offset to the right under it, and a picture lower right. Pick hero-minimal for a plain heading with no picture.
Writing for it
- Title up to 100 characters; it draws at display size, so two short lines is the most that fits. - Lead up to 200 characters and an optional paragraph up to 300. - Up to two buttons and a plain third link.
Watch out for
The offset needs room, so it works from a medium width up; narrow containers draw one column in reading order. A long title pushes the actions far from the picture, so keep it short.
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 |
|---|---|---|---|
eyebrow | string | 'Name the topic in a few words' | Text, up to 40 characters. |
title | string | 'Say in one line what the visitor ge…' | Text, up to 100 characters. |
description | string | 'Say what the page offers and who it…' | Text, up to 200 characters. |
body | string | 'Say in two or three lines what the …' | Text, up to 300 characters. |
primary | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
more | Link | {…} | Optional; empty is not rendered. |
media | Media | {…} | See the type. |
caption | string | 'Say what the picture shows.' | Text, up to 120 characters. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |