Components › Blocks
Chat message
An incoming or outgoing message with author, time, and optional avatar.
Installation
npx plankui@latest add chat-messageUsage
import { ChatMessage } from "@/components/ui/chat-message";
<ChatMessage author="Alex" side="end" timestamp="9:41">Is the preview ready?</ChatMessage>API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| author | string | required | Name shown above the message. |
| side | "start" | "end" | "start" | Incoming or outgoing alignment. |
| timestamp | string | Visible time label. | |
| dateTime | string | Machine-readable value for the time label. | |
| avatar | ReactNode | Optional avatar alongside the message. |