Calm motion: animations on this site only fade, with no movement
Suggestions
Ready prompts as a row of chips
Shows a few things that a person can ask, so an empty chat has a start, or a reply has next steps. A click sends the prompt. Put it above or under the prompt input.
Basic
itemsis a list of texts, or of{ label, prompt, icon }. The chip shows the label. A click emitsselectwith the prompt, or with the label when there is no prompt.selectgives the prompt text. Send it, or put it in the prompt input for the person to change first.- The chips wrap to more rows.
scrollkeeps them in one row that scrolls to the side, for a small screen. - Each chip is a button in a list, so a keyboard moves through them with Tab.
disabledturns all of them off, for example while a reply comes in. - Change the name of the list for screen readers with
labelsor a label pack:label.
Usage
ts
import { BlessSuggestions, type BlessSuggestion } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
items* | (string | BlessSuggestion)[] | — | |
scroll | boolean | — | one row that scrolls to the side, not rows that wrap |
disabled | boolean | — | |
labels | Partial<{ label: string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
select | [prompt: string, item: BlessSuggestion] |