Prompt Suggestions

Suggested prompt cards or chips (`PromptSuggestions`) that stagger in on first reveal, filter and highlight as the composer text changes via `query`, reflow with spring layout, move with arrow keys and hand the chosen prompt to `onSelect` — built for empty-chat welcome screens above a PromptInput.

Preview

Prompt Suggestions preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/prompt-suggestions
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

suggestions
PromptSuggestion[]
—
query?
string

Current composer text; suggestions filter to those matching every word.

onSelect?
((prompt: string, suggestion: PromptSuggestion) => void)
—
variant?
"card" | "chip"

`card` shows icon + title + subtitle in a grid; `chip` is a wrapping pill row.

card
columns?
1 | 2 | 3

Card grid columns from the `sm` breakpoint. Default 2.

2
limit?
number

Maximum suggestions shown at once.

—
highlight?
boolean

Highlight the matched words. Default true.

true
emptyMessage?
ReactNode

Shown when nothing matches; pass `null` to collapse instead.

No suggestions match — press Enter to send your own.
stagger?
number

Seconds between each item's entrance. Default 0.05.

0.05
aria-label?
string
Suggested prompts
className?
string
—
itemClassName?
string
—

Updated