Suggested prompts and starter actions for AI chat empty states.
Show suggested prompts near a composer or in an empty chat.
import {PromptSuggestion} from "@heroui-pro/react";
<PromptSuggestion>
<PromptSuggestion.Header> {/* Optional */}
<PromptSuggestion.Title>What can I help with?</PromptSuggestion.Title>
<PromptSuggestion.Description>Start from a suggested prompt.</PromptSuggestion.Description> {/* Optional */}
</PromptSuggestion.Header>
<PromptSuggestion.Items>
<PromptSuggestion.Item>
<PromptSuggestion.ItemHeader>
<PromptSuggestion.ItemTitle>Summarize this document</PromptSuggestion.ItemTitle>
<PromptSuggestion.ItemDescription>Create a concise summary.</PromptSuggestion.ItemDescription> {/* Optional */}
</PromptSuggestion.ItemHeader>
</PromptSuggestion.Item>
</PromptSuggestion.Items>
</PromptSuggestion>;Set variant="card" for items with a description, tags, or a footer.
HeroUI follows the BEM methodology to ensure component variants and states are reusable and easy to customize.
The Prompt Suggestion component uses these CSS classes:
.prompt-suggestion: Root suggestion group.prompt-suggestion__header: Header wrapper.prompt-suggestion__title: Header title.prompt-suggestion__description: Header description.prompt-suggestion__group / .prompt-suggestion__group-header / .prompt-suggestion__group-label / .prompt-suggestion__group-description: Item group and its header, label, and description.prompt-suggestion__items: Suggestion item grid/list.prompt-suggestion__item: Individual suggestion item.prompt-suggestion__item-label / .prompt-suggestion__item-end-icon: Pill label and the arrow shown on hover.prompt-suggestion__item-description / .prompt-suggestion__item-footer / .prompt-suggestion__item-tags / .prompt-suggestion__item-meta: Card item parts.prompt-suggestion--pill / .prompt-suggestion--card: Root variant modifiers.prompt-suggestion__items--pill / .prompt-suggestion__items--card: Items variant modifiers.prompt-suggestion__item--pill / .prompt-suggestion__item--card: Item variant modifiers:hover or [data-hovered="true"] on .prompt-suggestion__item (fill, and the pill's arrow):active or [data-pressed="true"] on .prompt-suggestion__item (scales down like Button):focus-visible or [data-focus-visible="true"] on .prompt-suggestion__item (focus ring):disabled or [aria-disabled="true"] on .prompt-suggestion__itemRoot suggestion group. Supports native div props.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "pill" | "card" | "pill" | Pill buttons or cards |
Header slots for title and description.
Labeled group of items. Supports native section props.
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | - | Group heading, rendered as h3 |
description | ReactNode | - | Text under the heading |
Container for suggestion items.
Individual suggestion item. Extends React Aria Button props, or Link props when href is set.
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | - | Renders the item as a link to this URL |
showEndIcon | boolean | true | Shows the hover arrow on pill items |
Card items render as a button or link, so don't put buttons or links inside them.
Slots for composing rich suggestion items. ItemHeader groups the title and description.
Resources