ZUI

Search documentation

Find a page or a heading.

Chat Message

One chat message row over upstream Message, with a line beside its leading edge while its text is still streaming.

tsx

Installation

bash

Usage

tsx

The consumer composes the row from upstream Message parts, and adds a ChatMessageAccent while the row streams:

tsx

Use it to mark a row as still streaming; a static row needs only upstream Message.

Composition

text

API reference

ChatMessage

Renders shadcn's Message and takes every prop it takes, plus:

It sets data-slot="chat-message" and data-streaming while streaming.

ChatMessageAccent

Renders a span and takes every prop a span takes. It is hidden from assistive technology, shown only while its row streams, and painted in --chat-message-accent (any CSS colour set on the row, such as the agent's), or --primary when that is unset. It sets data-slot="chat-message-accent" and aria-hidden.