Get StartedComponentsStylingThemingMath & Science
MCP

Chat

Message

A message row with avatar and grouping.

Markdown

Import

tsx
import { Message } from "@indoku/ui"

Examples

Basic usage

IB
Indoku Bot · 09:41

Halo! Ada yang bisa dibantu hari ini?

Tolong cek invoice bulan ini dong

Sent

avatarPosition="top" (ala Slack - avatar+nama sejajar bubble pertama)

IB
Indoku Bot · 09:41
Baris pertama grup ini.
Baris kedua, numpuk rapet di bawahnya.

avatarPosition="bottom" (default, ala iMessage/WhatsApp - avatar sejajar bubble terakhir)

IB
Baris pertama grup ini.
Baris kedua, numpuk rapet di bawahnya.

avatarPosition="none" (nggak ada avatar, grup ngepas ke tepi)

Baris pertama grup ini.
Baris kedua, numpuk rapet di bawahnya.

Props

Root

PropTypeDefaultDescription
alignMessageAlignstart"end" for your own message (right), "start" for the other side (left).

Group

PropTypeDefaultDescription
alignMessageAlignstartSide of the group: "start" (left, the other person) or "end" (right, you).
avatarReactNode–Avatar for the whole group, rendered once (not per bubble).
avatarPositionAvatarPositionbottomAvatar position relative to the group: "top" aligns with the first bubble (Slack style), "bottom" aligns with the last bubble (iMessage/WhatsApp style), "none" hides the avatar.
headerReactNode–Header shown once for the whole group (e.g. sender name + time), above the first bubble.
childrenReactNode–Bubble.Root elements (one or more) — not Message.Root; avatar and alignment are handled here.

* required. Style props and HTML attributes are accepted as well.

Created by @indokudev