Message
A chat turn row that arranges an avatar, a sender header, content and a footer, with directional entrances for each side.
Customize
Installation
npx shadcn@latest add @kinetic/messageUsage
Combine Message with Avatar and Bubble. align="end" mirrors the row for outgoing turns.
import { Avatar, AvatarFallback } from "@/components/kinetic/ui/avatar";
import { Bubble, BubbleContent } from "@/components/kinetic/ui/bubble";
import {
Message,
MessageAvatar,
MessageContent,
MessageFooter,
MessageHeader,
} from "@/components/kinetic/ui/message";
export function AssistantTurn() {
return (
<Message>
<MessageAvatar>
<Avatar>
<AvatarFallback>AI</AvatarFallback>
</Avatar>
</MessageAvatar>
<MessageContent>
<MessageHeader>Assistant</MessageHeader>
<Bubble variant="muted">
<BubbleContent>Your report is ready.</BubbleContent>
</Bubble>
<MessageFooter>10:42</MessageFooter>
</MessageContent>
</Message>
);
}Alignment
align="start" is for incoming turns and align="end" for outgoing ones. The entrance slides in from the matching side.
<Message align="end">
<MessageContent>
<Bubble align="end">
<BubbleContent>Thanks!</BubbleContent>
</Bubble>
</MessageContent>
</Message>Group
Wrap consecutive turns in MessageGroup to stagger them with staggerMs.
<MessageGroup staggerMs={60}>...</MessageGroup>Motion preferences
animated, blurPx and speed tune the entrance. Reduced motion shows turns without animation.
API Reference
MessageGroup
Zero-dependency container orchestrating capped staggered reveals across consecutive Message turns.
| Prop | Type | Default | Description |
|---|---|---|---|
animated / staggerMs / blurPx / speed | boolean / number / number / number | true / 42 / 3 / 1 | Controls turn stagger delay (0-120ms, max 180ms), initial blur (0-16px), and speed (0.25-4). |
Message
Turn row coordinating directional avatar settle, content motion, and subtle header/footer fades.
| Prop | Type | Default | Description |
|---|---|---|---|
align | "start" | "end" | "start" | Reverses row layout and aligns directional entrance for incoming or outgoing turns. |
animated / blurPx / speed | boolean / number / number | true / 3 / 1 | Toggles directional turn animation, blur settle, and speed multiplier. |
MessageAvatar / MessageContent / MessageHeader / MessageFooter
Avatar slot, content column (compatible with Kinetic Bubble), sender header, and footer metadata.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | React.ComponentProps<"div"> | - | Forwards standard div attributes and custom layout spacing. |