Suggestion

The Suggestion component displays a horizontal row of clickable suggestions for user interaction.

Installation

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/r/suggestion.json

If you prefer using jsrepo, please install via the command below:

pnpm dlx jsrepo add @ai/elements/ai-elements/suggestion

Props

Suggestion

NameTypeDefault
suggestion
string
onclick
(suggestion: string) => void
children
Snippet
class
string
variant
ButtonProps['variant'] 'outline'
size
ButtonProps['size'] 'sm'
...restProps
ButtonProps

Suggestions

NameTypeDefault
children
Snippet
class
string
orientation
'vertical' | 'horizontal' | 'both' 'horizontal'
scrollbarXClasses
string
scrollbarYClasses
string
...restProps
ScrollAreaProps