Components › Blocks

Chat message

An incoming or outgoing message with author, time, and optional avatar.

Installation

npx plankui@latest add chat-message

Usage

import { ChatMessage } from "@/components/ui/chat-message";

<ChatMessage author="Alex" side="end" timestamp="9:41">Is the preview ready?</ChatMessage>

API reference

PropTypeDefaultDescription
authorstringrequiredName shown above the message.
side"start" | "end""start"Incoming or outgoing alignment.
timestampstringVisible time label.
dateTimestringMachine-readable value for the time label.
avatarReactNodeOptional avatar alongside the message.

View the source on GitHub