PromptSuggestion
Loading example…
Chip with a suggested prompt. Pressing it hands the text to onSelect.
Import
Section titled “Import”import { PromptSuggestion } from "@jcsoftdev/ui/ai";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/ai/prompt-suggestion.
<PromptSuggestion> ¿Qué turnos libres hay mañana?</PromptSuggestion>| Prop | Type | Default | Description |
|---|---|---|---|
onSelect |
((text: string) => void) |
Receives the suggestion text when pressed (the visible label is the text). | |
children * |
string |
* marks a required prop.
It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).
Storybook stories
Section titled “Storybook stories”Source
Section titled “Source”packages/ui/src/ai/prompt-suggestion/prompt-suggestion.tsx