Message
Server ComponentUser and assistant bubbles with optional avatars.
Import
tsx
import { Message } from "@cronus-ui/ui";
bash
npx cronus-ui add message
Examples
API Reference
Generated from the component's exported types.
MessageProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLDivElement> | — | Ref forwarded to the underlying DOM node. |
from* | "user" | "assistant" | "system" | — | — |
MessageContentProps
Extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof messageContentVariants>
| Prop | Type | Default | Description |
|---|---|---|---|
ref | Ref<HTMLDivElement> | — | Ref forwarded to the underlying DOM node. |
variant | "contained" | "flat" | "contained" | One of "contained" | "flat". |
MessageAvatarLabels
| Prop | Type | Default | Description |
|---|---|---|---|
me* | string | — | — |
MessageAvatarProps
Extends ComponentProps<typeof Avatar>
| Prop | Type | Default | Description |
|---|---|---|---|
src* | string | — | — |
name | string | — | Submitted name when used in a form. |
labels | Partial<MessageAvatarLabels> | — | Override default English strings. |