Compose primitivesSuggestionPills
Suggestion Pills
Prompt suggestions as pills or as a two-column card grid.
SuggestionPills ships with a full API table, a copyable example, and accessibility notes.
tsx
Installation
Install the package once, then import SuggestionPills from its direct entry point or from the root.
bash
pnpm add @agent-ui/reacttsx
import { SuggestionPills } from "@agent-ui/react";Tailwind CSS v4 users: add @source "../node_modules/@agent-ui/react/src" to the global stylesheet so the library utilities are generated.
Usage
The example below is the same code that renders the preview. Copy it, swap in your own handlers, and ship.
tsx
import { SuggestionPills } from "@agent-ui/react"; <SuggestionPills items={[{ label: "Summarize this" }, { label: "Write a plan" }]} onPick={send}/>API reference
Every prop SuggestionPills accepts, its type, default, and behaviour.
| Name | Type | Default | Description |
|---|---|---|---|
| items | SuggestionItem[] | — | Items with label, icon, badge, description. |
| variant | "pill" | "card" | "pill" | Visual layout. |
| onPick | (label: string) => void | — | Called with the chosen label. |
| className | string | — | Merged onto the container. |
Use it with the rest of the library
SuggestionPills composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.
6 lines · copy-ready