AI Chat Fancy Stable

PromptSuggestions

Row of prompt pills that cascade in after a reply lands, offering the user a next turn without composing one

Preview

Installation

pnpm add fancy-ui-svelte
import { PromptSuggestions } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { PromptSuggestions } from 'fancy-ui-svelte';
</script>

<PromptSuggestions />

Examples

Basic Usage

Props

PropTypeDefaultDescription
suggestions *string[]-Prompt texts offered to the user, in display order
onSelect (suggestion: string, index: number) => void-Called with the chosen prompt and its index when a pill is activated
visible booleantrueWhether the pills are shown; flipping this to true replays the entrance
staggerMs number60Delay between two consecutive pills entering, in milliseconds
label string"Suggestions"Accessible name of the group wrapping the pills

Slots

SlotDescription
itemCustom pill content, receiving the suggestion and its index