Raft Design System

Components · Messages

MessageReplies

The thread under a message — a gray block with the reply count, a pink count of new replies and up to 3 previews — that opens the thread as one control.

StableAlso called Thread replies
import { MessageReplies } from "@botiverse/raft-ui";

The thread summary under a message: a soft gray block that says how many replies there are, shows a pink count when some are new, and previews the latest replies. The whole block is one control that opens the thread.

message-replies/compositions/default

When to use

SituationUse
A message has replies in a threadMessageReplies, under the message's body
A link to a thread inside running textA reference chip (MessageItem)
The thread itselfThreadPanel: beside the conversation on desktop, covering it with Back on a phone (Conversation)

Anatomy

  • MessageReplies: the block. A button by default; render a link when the thread has a URL. Required.
  • MessageRepliesSummary: the first line. Required.
    • MessageRepliesSummaryItem: one fact in it: "4 replies", "1 new", "Draft". Rendered as strong, it becomes the pink count of new replies.
  • MessageRepliesItem: one reply preview, up to 3:
    • a small Avatar;
    • MessageRepliesItemSender: the name;
    • MessageRepliesItemContent: the start of the reply;
    • MessageRepliesItemTime: when it was sent, in Space Mono.

States

StateLook
No new repliesThe summary in foreground-muted
New repliesThe summary in ink, with the count of new replies as a pink sticker
A draft in the threadA Draft item in the summary
message-replies/compositions/single-unread
message-replies/compositions/unread-draft

Behavior

  • Selecting anywhere on the block opens the thread. The block is read, so it hovers with the subtle tier and presses with the medium tier (Hover and press).
  • The block lines up with the message text and is at most 560px wide, a content card's width (Cards in messages). It is not a framed card: a filled, borderless summary, 10px from its sides and 8px from its top and bottom, so a message with replies doesn't look as if it carried a second card (Cards in messages).
  • Each preview keeps to one line: the content truncates, the name and the time stay.

Content

  • Write the count as "1 reply" or "4 replies", and the new count as "1 new".
  • Separate the summary items with a middle dot.
  • Show the latest replies, at most 3 (Conversation).

Accessibility

  • MessageReplies is one button or link; nothing inside it is focusable.
  • Give it an aria-label that says which thread it opens, such as "Open the #launch-week checklist thread": its content is long and would otherwise be read in full.
  • Hide the separators and the trailing chevron from assistive technology (aria-hidden).
  • Render each MessageRepliesItemTime with dateTime.

Rules

  • Put the block on fill-muted, without a border: it is part of the message, not a card.
  • Show new replies as a pink count with ink type, like every unread count (States). Don't use another color for thread replies.

API

MessageReplies, MessageRepliesItem, MessageRepliesItemContent, MessageRepliesItemSender, MessageRepliesItemTime, MessageRepliesSummary, MessageRepliesSummaryItem

PropTypeDefault
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

Changes

  • 0.107.3 · Design SystemA sticker's ink edge follows its size ([Shape › Stroke widths](https://raft-design.botiverse.build/foundations/shape/#stroke-widths)): a sticker that carries a label (a number, a word, or an icon that stands for one) and is under 24px tall takes a 1px ink edge, and in dark mode a 1px die-cut edge outside it. A larger sticker, or one with no label that relies on its edge for its shape, keeps 1.5px: buttons, the selected row, tab and segment, avatars and their corner marks (and an avatar stack's +N count), status pixels and attention dots. Changed in this release: Badge (appearance="solid"), SidebarItemCount, SidebarItemIndicator, AppRailItemBadge, the new count in MessageRepliesSummary, a mention of you (MessageReferenceText variant="primary"), and the Steps number.
  • 0.5.36 · ChangedMessageReplies stays on the message text line: the dead right margin is gone (a 100%-wide block drops an over-constrained -mr-2) and a browser spec now pins the rendered right edge, so a class-only assertion can no longer regress it silently. Run it with vp test --browser.enabled.