Hero, prompt box


Install
npx shadcn add https://ui.klarhimmel.com/r/hero-prompt-box.jsonDetailsAbout, usage, props and more
A large dark prompt box with a round send arrow, a row of suggestion chips under it, then a filled button beside a plain link; the two actions stack on a phone.
Import
Import
- hero/prompt-box
- 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 large dark prompt box with a round send arrow, suggestion chips under it, and a filled button beside a plain link. Use it when the product starts from something the visitor types, and hero-url-form when it starts from an address.
Writing for it
- Set the box's placeholder as an example of a good request, since it is what the visitor sees before typing. - Write the chips as real starting points a visitor can pick, three to five of them, in the same voice as the box. - Point the form action at the page that handles the text, and the form submits natively with its method.
Watch out for
The title is optional here and an emptied one draws no heading, so a page that needs a heading for its outline must keep it. The two actions stack on a phone.
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 |
|---|---|---|---|
title | string | 'Say what the visitor can make here,…' | Text, up to 80 characters. |
placeholder | string | 'Ask the visitor the one question th…' | Text, up to 80 characters. |
submit | string | 'Send' | Text, up to 24 characters. |
chips | { label }[] | 4 items | List of up to 6. Each item: label. |
primary | Link | {…} | See the type. |
secondary | Link | {…} | Optional; empty is not rendered. |
action | string | - | Text, up to 300 characters. Optional; empty is not rendered. |
method | 'post' | 'get' | - | One of 'post', 'get'. Optional; empty is not rendered. |
hidden | { } | - | Optional; empty is not rendered. |
captcha | boolean | - | Optional; empty is not rendered. |
captchaSitekey | string | - | Text, up to 100 characters. Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |