Prompt Suggestions
NewStarter prompt cards for an empty chat, or follow-up chips under an answer.
Pick a suggestion
Installation
$ pnpm dlx shadcn@latest add @synccn/prompt-suggestionsFirst time in this project? Connect synccn with one command.
Usage
import { PromptSuggestions } from "@/components/ui/prompt-suggestions";<PromptSuggestions variant="cards" suggestions={starters} onSelect={send} />API reference
Generated from the component's TypeScript types, so it always matches the code.
PromptSuggestions
Starter prompts for an empty chat (cards) or follow-up questions under an answer (chips).
PropTypeDescription
- suggestionsrequired
PromptSuggestion[]—
- onSelectrequired
(prompt: string) => voidCalled with the prompt to send.
- variant
"chips" | "cards"Default
"chips""chips" for follow-ups under an answer, "cards" for an empty chat.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
- lucide-react for ArrowUpRight
Used by
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA attributes: aria-label
More ai
AI MessageOne turn in an AI chat: the person's bubble, or the assistant's answer with copy, regenerate, ratings and version arrows.Streaming TextAnswer text that types itself out with a caret and light Markdown, and follows a real stream smoothly as it grows.Reasoning"Thinking…" panel for reasoning models: opens while the model thinks, shows how long it took, folds away after.Tool CallAn agent's function call with live status, arguments, result, timing and an approve or deny step.SourcesInline citation numbers with a preview on hover, and a "Used 3 sources" list that matches them.Model SelectorModel picker for the composer: descriptions, capability badges, context size, locked models and full keyboard support.