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.
tsx
Props
Root
| Prop | Type | Default | Description |
|---|---|---|---|
align | MessageAlign | start | "end" for your own message (right), "start" for the other side (left). |
Group
| Prop | Type | Default | Description |
|---|---|---|---|
align | MessageAlign | start | Side of the group: "start" (left, the other person) or "end" (right, you). |
avatar | ReactNode | – | Avatar for the whole group, rendered once (not per bubble). |
avatarPosition | AvatarPosition | bottom | Avatar 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. |
header | ReactNode | – | Header shown once for the whole group (e.g. sender name + time), above the first bubble. |
children | ReactNode | – | 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