Skip to content
AI Elements

Message

Server Component

User 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>

Skip MessageProps props table
PropTypeDefaultDescription
ref
Ref<HTMLDivElement>Ref forwarded to the underlying DOM node.
from*
"user" | "assistant" | "system"

MessageContentProps

Extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof messageContentVariants>

Skip MessageContentProps props table
PropTypeDefaultDescription
ref
Ref<HTMLDivElement>Ref forwarded to the underlying DOM node.
variant
"contained" | "flat""contained"One of "contained" | "flat".

MessageAvatarLabels

Skip MessageAvatarLabels props table
PropTypeDefaultDescription
me*
string

MessageAvatarProps

Extends ComponentProps<typeof Avatar>

Skip MessageAvatarProps props table
PropTypeDefaultDescription
src*
string
name
stringSubmitted name when used in a form.
labels
Partial<MessageAvatarLabels>Override default English strings.