ZUI

Search documentation

Find a page or a heading.

Chat Suggestion Item

One starter prompt in an empty conversation, an upstream Item rendered as a button that hands its prompt to onSelectPrompt when picked.

tsx

Installation

bash

Usage

tsx
tsx

The consumer composes the empty state and each item's content around it. Use it for a starter prompt in an empty conversation; a plain upstream Item fits a row that is not itself selectable.

API reference

ChatSuggestionItem

Renders a button and takes every prop a button takes, plus:

An upstream Item at size="sm", rendered as this button; upstream's own hover matches only a, so this draws hover:bg-muted itself while enabled, merging className against the Item recipe. Picking it hands prompt to onSelectPrompt, after the caller's own onClick, unless that call preventDefault()s. Without onSelectPrompt it renders disabled - a read-only preview - unless disabled says otherwise. It sets data-slot="chat-suggestion-item".