Hero, install command


Install
npx shadcn add @klarhimmel/hero-codeDetailsAbout, usage, props and more
Centered headline with a copyable install command and two links. For developer tools and libraries.
Import
Import
- hero/install
- 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 centred opener for developer tools, where the first thing the reader does is copy an install command. For a product with a screenshot to show, hero-frame or hero-split fit better.
Writing for it
- The command holds 120 characters and is shown in a copyable block, so write it as one runnable line without a prompt symbol. - Use primary for the docs and secondary for browsing examples. The secondary renders as a ghost link, so it will look quieter than the primary button. - The eyebrow (60) is a good place to state the licence or kind of project, such as open source toolkit.
Watch out for
The command sits at a fixed narrow width. A long line with flags or a full URL will scroll or wrap inside the block rather than widening it, so keep it near 40 characters.
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 300 characters. |
command | string | 'npm create your-app@latest' | Text, up to 120 characters. |
primary | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |