Message
One chat message with a role, optional name, status and actions.
Can you summarise the open pull requests?
Assistant
There are three open. Two are waiting on review from Lena Fischer and one has failing checks.
Which one is failing?
Assistant
Thinking…
When to use
- Rendering a transcript from user and assistant turns.
- You need a pending state for a reply still arriving.
When not to use
- The content is a comment in a discussion; use the comment thread.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/message
Adds its 6 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
Message
10 props
PropTypeDefaultDescription
role *"user" | "assistant" | "system"—
namestring—Shown above assistant and system messages.
avatarstring—
timestring—Display text for the time, for example "9:41 AM".
statusMessageStatus"complete"
statusTextstring—Replaces the default error or stopped sentence.
onRetry(() => void)—
actionsReactNode—Buttons shown under the message, such as MessageActions.
childrenReactNode—
classNamestring—
MessageBubble
0 props
No props of its own; it accepts the native props of its root element.
MessageActions
3 props
PropTypeDefaultDescription
textstring—What Copy puts on the clipboard.
onRegenerate(() => void)—
childrenReactNode—
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements and keeps aria-label, aria-busy and aria-hidden in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/message.mdThe index of every part is at /llms.txt.