MessageGroup
A run of messages one person sent in a row, laid out flat the way a team chat reads.
Store screenshots are final, light and dark.
@Sam can you check the dark one? (edited)
T3 replies Last reply 10:58View code
<MessageGroup>
<MessageGroup.Item id="m-1">
<MessageGroup.Avatar>
<Avatar>
<Avatar.Fallback>MO</Avatar.Fallback>
</Avatar>
</MessageGroup.Avatar>
<MessageGroup.Header>
<span>Mira Okafor</span>
<time dateTime="2026-11-18T10:42">10:42</time>
</MessageGroup.Header>
<MessageGroup.Content>
<p>Store screenshots are final, light and dark.</p>
</MessageGroup.Content>
<MessageGroup.Actions aria-label="Message actions">
<Button variant="ghost" color="neutral" size="sm" aria-label="Reply in thread">
<MessageSquareTextIcon size={16} />
</Button>
<Button variant="ghost" color="neutral" size="sm" aria-label="More actions">
<EllipsisIcon size={16} />
</Button>
</MessageGroup.Actions>
</MessageGroup.Item>
<MessageGroup.Item id="m-2" mentioned>
<MessageGroup.Time dateTime="2026-11-18T10:43">10:43</MessageGroup.Time>
<MessageGroup.Content>
<p>
@Sam can you check the dark one? <MessageGroup.Edited>(edited)</MessageGroup.Edited>
</p>
<MessageGroup.Thread href="#thread" avatars={<Avatar size="sm"><Avatar.Fallback>T</Avatar.Fallback></Avatar>}>
<strong>3 replies</strong> Last reply 10:58
</MessageGroup.Thread>
</MessageGroup.Content>
</MessageGroup.Item>
</MessageGroup>Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
import { MessageGroup } from "@sdxc/ui/chat";Renders the run's host. Lines inside share one gutter width, so the text column stays straight from the first line to the last.
Composition
The parts the component publishes, each a static property of the host.
MessageGroupMessageGroup.ItemRenders one message as a two-column line: the gutter (the avatar on the first line, the hover time on later ones) and the content column under its header.MessageGroup.AvatarRenders the first line's avatar at the top of the gutter.MessageGroup.HeaderRenders the first line's name, time and any role chip on one baseline.MessageGroup.TimeRenders a later line's time in the gutter, hidden until the line is hovered or focused, so a long run reads as one block while every time stays one glance away.MessageGroup.ContentRenders the message's body column: its text, files, reactions and thread summary stacked.MessageGroup.EditedRenders the quiet mark after a message's text that says it was changed after sending.MessageGroup.ActionsRenders the line's action bar, floated over its top-end corner and shown while the line is hovered or holds focus, so keyboard users reach every action by tabbing into the message.MessageGroup.ThreadRenders the link under a message that opens its thread: the repliers' faces, the reply count in the accent colour and when the last reply came, boxed on hover.
Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
| Prop | Type | Required | Description |
|---|---|---|---|
children | RemixNode | Yes | One MessageGroup.Item per message, oldest first. |
Also accepts everything in TagProps<"div">.
MessageGroup.Item
| Prop | Type | Required | Description |
|---|---|---|---|
mentioned | boolean | No | Marks a message that names the reader, drawn with an accent edge and a warm tint so it stands out in a busy log. |
current | boolean | No | Marks the message the address or a thread panel points at. |
children | RemixNode | Yes |
Also accepts everything in TagProps<"article">.
MessageGroup.Avatar
| Prop | Type | Required | Description |
|---|---|---|---|
children | RemixNode | Yes |
Also accepts everything in TagProps<"div">.
MessageGroup.Header
| Prop | Type | Required | Description |
|---|---|---|---|
children | RemixNode | Yes | The sender's name first, then quieter metadata such as the time or a role. |
Also accepts everything in TagProps<"header">.
MessageGroup.Time
| Prop | Type | Required | Description |
|---|---|---|---|
children | RemixNode | Yes | The short time, such as "10:42". |
Also accepts everything in TagProps<"time">.
MessageGroup.Content
| Prop | Type | Required | Description |
|---|---|---|---|
children | RemixNode | Yes |
Also accepts everything in TagProps<"div">.
MessageGroup.Edited
| Prop | Type | Required | Description |
|---|---|---|---|
children | RemixNode | Yes | The word shown, such as "(edited)". |
Also accepts everything in TagProps<"span">.
MessageGroup.Actions
| Prop | Type | Required | Description |
|---|---|---|---|
children | RemixNode | Yes | Small icon buttons; on a touch screen only the last one shows, so put a menu last. |
Also accepts everything in TagProps<"div">.
MessageGroup.Thread
| Prop | Type | Required | Description |
|---|---|---|---|
href | string | Yes | |
avatars | RemixNode | No | Small avatars of the people who replied, overlapped at the start. |
children | RemixNode | Yes | The reply count and when the last one came, such as "3 replies · Last reply 2h ago". |
Also accepts everything in Omit<TagProps<"a">, "children" | "href" | "role">.