Prompt Suggestion

One-tap suggestion chips that seed the prompt composer with starter prompts.

PromptSuggestion chips sit above or beside the composer and insert a starter prompt on click. Use PromptSuggestions for a scrolling row or a wrapping grid.

Installation

pnpm dlx cubix@latest add prompt-suggestion --base radix

Usage

Import
import {
  PromptSuggestion,
  PromptSuggestions,
} from "@/components/cubix/prompt-suggestion"
Example
<PromptSuggestions>
  <PromptSuggestion
    suggestion="Summarize the deploy checklist"
    onClick={setPrompt}
  />
</PromptSuggestions>

Composition

 
PromptSuggestions
├── PromptSuggestion
└── PromptSuggestionsEmpty

Features

  • Horizontal scroll or wrap layouts for starter prompts
  • Active, disabled, icon, and loading chip states
  • Works with PromptInputProvider to seed the composer

With icons

Active

Disabled

Empty

No starter prompts for this workspace yet.

Horizontal scroll

Overflowing chips scroll sideways without a visible scrollbar.

Wrap

Loading

Variants

With Prompt Input

Pair with PromptInputProvider so a chip can fill the textarea.

Empty conversation

How can I help?

Choose a starter prompt to seed the composer.

API Reference

PromptSuggestions

PropTypeDefaultDescription
orientation"horizontal" | "wrap""horizontal"horizontal scrolls chips in one row; wrap flows chips onto multiple lines.
childrenReact.ReactNode-PromptSuggestion chips or loading skeletons.
classNamestring-Additional classes for the suggestions row.

PromptSuggestion

PropTypeDefaultDescription
suggestionstring-Prompt text passed to onClick. Also used as the label when children are omitted.
onClick(suggestion: string) => void-Called with the suggestion string when the chip is pressed.
activebooleanfalseMarks the chip as selected and sets aria-pressed.
disabledboolean-Prevents selection while keeping the chip visible.
variantButton variant"outline"Visual style forwarded to Button.
sizeButton size"sm"Chip size forwarded to Button.
childrenReact.ReactNode-Optional custom content such as an icon plus label. Defaults to suggestion.

PromptSuggestionsEmpty

PropTypeDefaultDescription
childrenReact.ReactNode"No suggestions yet."Empty-state copy shown when no chips are available.
classNamestring-Additional classes for the empty surface.