Hero, split


Install
npx shadcn add @klarhimmel/hero-splitDetailsAbout, usage, props and more
Headline, short description and two actions on the left; an image on the right. Stacks in narrow containers.
Import
Import
- hero/split
- 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
An opener with text on one side and an image on the other, the usual choice when the picture explains the product. Use hero-centered if the image is wide, and hero-code if the main thing is a command.
Writing for it
- The title here is set a size smaller than in the centred heroes, so it can hold its 120 characters across several lines without dominating the image. - Command (120) is optional and adds a copyable line under the buttons, which suits a product you can try from the terminal. Leave it out for a normal marketing page. - The note holds 80 characters and is optional. Put the pricing or trial terms there, near the buttons.
Watch out for
Only command and note are optional in the schema. Empty media is still drawn as an image slot, so do not leave media out and expect the text to fill the width.
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 what this is' | Text, up to 60 characters. |
title | string | 'Say what the visitor gets in one li…' | Text, up to 120 characters. |
description | string | 'Say in one or two sentences what it…' | Text, up to 900 characters. Optional; empty is not rendered. |
primary | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
media | Media | {…} | See the type. |
command | string | 'npm create your-app@latest' | Text, up to 120 characters. Optional; empty is not rendered. |
note | string | 'Say what makes starting easy.' | Text, up to 80 characters. Optional; empty is not rendered. |
titleSize | 'title' | 'display' | - | One of 'title', 'display'. Optional; empty is not rendered. |
actionsBelow | boolean | - | Optional; empty is not rendered. |
stats | { value, label }[] | - | List of up to 4. Each item: value, label. Optional; empty is not rendered. |
statsLook | 'cards' | - | One of 'cards'. Optional; empty is not rendered. |
actionsUnderMedia | boolean | - | Optional; empty is not rendered. |
points | { icon, title, description }[] | - | List of up to 3. Each item: icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge'), title, description. Optional; empty is not rendered. |
tall | boolean | - | Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |