# Hero, prompt

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

Centred headline with a prompt input as the call to action and suggestion chips. For AI products.

## Import

- **CLI**

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

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

Also called

- hero/prompt

- **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 built around an input: a prompt box, a site address field or a search, with suggestion chips below. It is for products where the visitor's first act is typing; for a plain pitch use `hero-centered`.
- **Writing for it**: - Placeholder (120) and submit (20) are both required. Make the placeholder an example of a good answer, and set inputLabel (80) so the field has a proper accessible name.
- Suggestions take up to five chips of 60 characters each; they should be real prompts a visitor could send as they are.
- For a site address, set multiline to false and inputType to domain. The optional field adds a second labelled input under the prompt only when it has a label.
- **Watch out for**: The sent and error states come from the status prop, which only the host can set; the block never decides on its own that a submit worked. Without action and method it does not submit natively.

## Pairs well with

- **[Navbar, simple](/blocks/navigation/simple)**
- **[Logos strip](/blocks/logo-cloud/row)**
- **[Steps, numbered](/blocks/steps/numbered)**

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <HeroPrompt 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.",
          "placeholder": "Describe what you want, in a line…",
          "submit": "Send",
          "suggestions": [
            "Give a first example request",
            "Give a second example request",
            "Give a third example request"
          ],
          "note": "Say what makes starting easy.",
          "messages": {
            "sent": "Confirm that the request arrived and what happens next.",
            "error": "Say that it failed and ask them to try again."
          }
        }} />
      </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.
- **descriptionPlacement**: One of 'under-title', 'under-note'. Optional; empty is not rendered.
- **placeholder**: Text, up to 120 characters.
- **submit**: Text, up to 20 characters.
- **suggestions**: List of up to 5. Optional; empty is not rendered.
- **note**: Text, up to 80 characters.
- **inputName**: Text, up to 40 characters. Optional; empty is not rendered.
- **multiline**: Optional; empty is not rendered.
- **inputType**: One of 'text', 'url', 'domain'. Optional; empty is not rendered.
- **grow**: Optional; empty is not rendered.
- **inputLabel**: Text, up to 80 characters. Optional; empty is not rendered.
- **escape**: Optional; empty is not rendered.
- **escapePlacement**: One of 'inside', 'below'. Optional; empty is not rendered.
- **field**: Fields: label (optional), name (optional), placeholder (optional), type ('text' | 'url' | 'domain') (optional), required (optional), escape (optional). Optional; empty is not rendered.
- **action**: Text, up to 300 characters. Optional; empty is not rendered.
- **method**: One of 'post', 'get'. Optional; empty is not rendered.
- **hidden**: Optional; empty is not rendered.
- **captcha**: Optional; empty is not rendered.
- **captchaSitekey**: Text, up to 100 characters. Optional; empty is not rendered.
- **status**: One of 'idle', 'sent', 'error'. Optional; empty is not rendered.
- **messages**: Fields: sent, error. Optional; empty is not rendered.
- **errors**: Fields: required (optional), email (optional), url (optional), domain (optional). Optional; empty is not rendered.
- **bare**: Optional; empty is not rendered.
- **attach**: Fields: label (optional), accept (optional), name (optional), multiple (optional). Optional; empty is not rendered.
- **tools**: List of up to 2. Each item: label, icon ('globe' | 'bot' | 'sparkles' | 'image' | 'link') (optional), kind ('toggle' | 'link'), name (optional), href (optional). Optional; empty is not rendered.
- **height**: One of 'auto', 'screen'. Optional; empty is not rendered.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/hero/panel-tiles)

[Next](/blocks/hero/prompt-box)
