# Hero, install command

- **[Sections](/blocks/)**
- **[Hero](/blocks/hero/)**
- **Hero, install command**

Centered headline with a copyable install command and two links. For developer tools and libraries.

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/hero-code
  ```
- **Import**

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

Also called

- 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

- **[Navbar, simple](/blocks/navigation/simple)**
- **[Features, terminal](/blocks/features/terminal)**
- **[Logos strip](/blocks/logo-cloud/row)**

## 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 HeroCode from '@/components/klarhimmel/blocks/hero-code';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroCode props={{
          "eyebrow": "Name what this is",
          "title": "Say what the visitor gets in one line",
          "description": "Say in one or two sentences what it does, who it is for and what the visitor can do next, in plain words.",
          "command": "npm create your-app@latest",
          "primary": {
            "label": "Main action",
            "href": "#docs"
          },
          "secondary": {
            "label": "Second action",
            "href": "#components"
          }
        }} />
      </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.

- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 300 characters.
- **command**: Text, up to 120 characters.
- **primary**: Optional; empty is not rendered.
- **secondary**: Optional; empty is not rendered.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/hero/centered)

[Next](/blocks/hero/cover)
