Skip to main content

Message

Show one turn of a chat: the person's in a raised bubble, the assistant's as text with Copy, Retry & a thumbs up.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
fromuser | assistantassistantWho wrote it: the person's turn sits on the right in a raised bubble, the assistant's on the left as plain text.
Who wrote it: the person's turn sits on the right in a raised bubble, the assistant's on the left as plain text.
childrenReactNode-The message.
The message.
namestring-A name over an assistant's message.
A name over an assistant's message.
avatarReactNode-A small mark beside the name, such as the model's.
A small mark beside the name, such as the model's.
copyTextstring-
onRetry() => void-Adds Retry under an assistant's message.
Adds Retry under an assistant's message.
onFeedback(good: boolean) => void-Adds a thumbs up under an assistant's message, called with its new state.
Adds a thumbs up under an assistant's message, called with its new state.
shapenone | rounded | pillrounded
classNamestring-
focusboolean | stringtrue