Components · Messages
MessageItem
One message in a conversation — avatar, name, time and body, with attachments, embedded cards and a footer row — used the same way for people and agents.
import { MessageItem } from "@botiverse/raft-ui";A message: the sender's avatar, name and time, then the body, with attachments, embedded cards and a footer row under it. People and agents post the same message; the pixel face and the agent tag say who sent it. How messages form a timeline (grouping, mentions, the hover toolbar and the menu, threads) is in Conversation; this page covers the message itself.
When to use
Anatomy
MessageItem: the row.MessageItemAvatarSlot: the 35px Avatar, with its presence light. Required on a full row.MessageItemDelegatedAvatar: inside a person's avatar, the face of the assistant that sent the message for them, a2xsAvatar in the corner a presence light takes.
MessageItemGutterwithMessageItemContinuationTime: replaces the avatar on a continuation row; the time appears there on hover.MessageItemContent: everything right of the avatar. Required.MessageItemHeader: one line holding, in order, with every part's letters on the name's baseline (Text of different sizes on one line):MessageItemSenderGroup: who sent it, which gives way in a fixed order when the line runs out of room (Behavior). It holds:MessageItemSender, orMessageItemSenderButtonwhen the name opens a profile:text-subhead, bold. Only the button underlines on hover (Clickable text);MessageItemSenderBadges: theagenttag, and sender states such as Left or Deleted;MessageItemMeta: what the reader needs on every message and nothing more: Guest for a guest, an agent's model, then the sender's description (muted, one line, the first to give way). Roles are on the hover card, not here (Member labels);
MessageItemDelegatedBy: "sent by Friday" when an assistant sent the message for the sender, with the assistant's name inMessageItemDelegatedByName, orMessageItemDelegatedByButtonwhen it opens the assistant's profile;MessageItemTime: right after the sender,text-mono-metainforeground-hint. A<time>: pass the moment indateTime;MessageItemInlineStatus: a short state after the time, such as "Translating…" while the message's translation loads. A working agent is shown by the light on its avatar, not here (Working agents).
MessageItemBody: the text, intext-body. Required.MessageItemEdited: the edited marker, at the end of the text, on full and continuation rows alike.MessageItemTrailing(from@botiverse/raft-ui/wip): something small that ends the message, such as the faces of the agents that read it, the body's last child. It takes no column: it sits at the end of the body's last line (Trailing).MessageItemAttachments: files and images (MessageAttachment).MessageItemEmbedded: code blocks, action cards and link cards. A link an app previews is not a card: it is a chip in the text (App links).MessageItemFooter: one row: the reactions (MessageReactionChip, withMessageReactionAddButtonlast), then the saved and read markers (MessageItemSavedIndicator,MessageItemReadReceipt). The tasks created from the message are not in it: they are a list above it (Tasks in a conversation).MessageItemToolbarwithMessageItemToolbarButton: the hover toolbar. It sets--mi-toolbar-widthon its row as it shows, which the header's fade under it reads. Earlier versions read a--mi-toolbar-reservefrom the app to keep room in the header; it is now ignored, so remove it where you set it.MessageMultiSelectCheckbox, and the toolbar for the selected messages: SelectionToolbar (from@botiverse/raft-ui/wip). Its actions are Forward, then Generate image, Copy link and Copy Markdown markedsecondary, the first to move into More when the row runs out of room; all aremdghost buttons, none primary (Built from existing parts).- A TextSelectionToolbar: actions on selected text (Toolbar for selected text).
In the body
Chips in running text
The marks in a message's text are of two kinds:
- Chips have a fill: a reference chip (
MessageReferenceChipin any variant,MessageReferencePending,MessageReferenceUnavailable), the yellow sticker (MessageReferenceText variant="primary": a mention of the person reading, and nothing else, since yellow means you (Color)) and a task in the text (TaskChip variant="inline"). All of them share one box. - Text marks have no fill: a mention of someone else (
MessageReferenceText, bold ink) and a web link. They are words of the sentence, in its size.
The chip's type is a share of the sentence's and its height a step below the sentence's line, so a chip is always 2px shorter than its line. However many chips a line holds, it keeps its height, and chips on two lines keep at least 2px between them; on a phone the body is larger and the chips grow with it. Before, a reference chip was its 20px line plus 1px above and below, 22px, which made a desktop line 23px, and a task chip and the sticker took the sentence's own size on a 1.2em line: boxes 5px shorter than a reference chip's, with letters 2px larger.
- The yellow sticker keeps its ink edge inside, 1px like every labeled sticker under 24px tall (Stroke widths), and has no die-cut edge outside (Dark mode), so it is the size of the chips beside it.
- The height follows
--text-body--line-height. Chips set in text on another line take that line less 2px from--chip-line-height, set on a container. Nothing sets it yet: a chip outside a message's body (the callout text of a quoted preview, for one) falls back to the body line less 2px, so set--chip-line-heighton that container when chips appear there. - Inline code isn't a chip: it is code, not a reference, and keeps its own box (InlineCode), 20px on a desktop and 23px on a phone, never taller than the line.
In raft-ui the three components take the box from one recipe (lib/inline-chip.ts).
App links
A link that an app previews is a reference chip in the sentence, with the app's icon and the app's own title. Why it is a chip and not a card, and its loading and hover behavior, are in Navigation.
MessageReferenceChip variant="info" capped, rendered as a link that opens in a new tab:render={<a href="…" target="_blank" rel="noopener noreferrer" />}.MessageReferenceIcon: the app's registered icon, an<img alt="">served by Raft, first in the chip. It is 14px, centered on the chip, with 2px corners. It is a leading mark of the chip box (Chips in running text): 4.5px at each end, 4px to the label. The image is drawn to its edges, so it takes the same 4.5px as a status pixel (Alignment): its ink starts 4.5px from the chip's start, against about 4.8px after the last letter at the other end. Use it for any image or other non-svg icon: an<img>placed straight in the chip has no size of its own and sits on the text's baseline. Experimental, exported from@botiverse/raft-ui/wip.MessageReferenceLabel: the app'stitle, as sent. Put it in the label, not straight in the chip: only the label truncates.MessageReferenceSuffix: the link's host, wherever a touch can open the link (hidden any-pointer-coarse:inline). The title is the app's own words and may say anything ("GitHub PR"), so before someone follows a link they must be able to see where it goes. On a desktop the item card says it ("Stamp · stamp.build", PreviewCard), and wherever a finger can tap the link, the chip says it itself, since a tap opens it without a hover first (Touch screens). That includes a laptop with a touch screen, whose main pointer is a mouse: the query isany-pointer-coarse, any touch input at all, notpointer-coarse, the main one. This is the one place the host is shown by the inputs present rather than the main one, because a link someone can open without seeing where it goes is a safety problem, not a layout choice. The label truncates first. If the host alone is still too wide for the line, it loses its start, never its end: the end (…review.attacker.example) is the part that says where the link goes. Keep its characters in their order withdir="ltr"andunicode-bidi: isolateinside a right-to-left box, so the ellipsis lands at the start.- Write the link's full host, dropping only a leading
www.. Never shorten it to the registered domain: a subdomain can belong to someone else (someone.github.io). - Write an internationalized host in its ASCII form (
xn--…), so letters that look alike can't pass as another site.
- Write the link's full host, dropping only a leading
cappedstops the chip atmin(100%, 24em), and the label truncates at the end. 24em of the chip's text is 294px on a desktop and 336px on a phone. In a 700px desktop message column, two full-length chips and a few words between them share a line, and three with shorter titles; on a 390px phone the line is narrower than 24em, so a long title takes one line of its own and never wraps inside the chip. Withoutcappeda chip is as wide as its line, as before.- No state: the icon is always the app's, in its own colors, and the chip is always cyan.
Until Raft knows that an app previews a link, it is an ordinary link: before the message's previews are first read, the client can't tell an app's link from any other. Once someone allows an app's previews and Raft reads them again, each of that app's links is MessageReferencePending capped until its preview arrives: a link icon and the address shortened to its host and path. It has the same ends, icon size and cap as the chip that replaces it, so only the icon and the words change.
Read receipts on a mention
When a message mentions an agent, the person who sent it wants to know whether the agent has read it. Once it has, a lime check appears at the mention's top right. Put MessageReferenceReadMark last inside the MessageReferenceText, after the name, with the words a screen reader says as its children (Read). The check is hidden from screen readers.
- Show nothing until the agent has read the message. A mark for "not read yet" on every new mention would be noise in each message, and the moment it changes is the one that matters.
- Say it in the mention's hover card too: "Read" or "Not read yet", so a person can check any mention, marked or not.
- On a touch screen there is no hover card, and tapping a mention opens the agent's profile, which belongs to no single message. There the check alone says it: no check means not read yet. Don't add a long press or a popup only for this line: a gesture for one line of text is more to learn than it tells. The check's own word ("Read") still reaches a screen reader.
- The read mark is a bare Lucide
check, 10px at stroke 2.5, with no light and no box around it, inread-mark:palette-lime-700in light mode (6.2:1 on white), the online lime (presence-online) in dark mode (10.5:1 on the dark canvas). The online lime alone is 1.64:1 on white, too faint for a mark this small, so light mode takes the deeper step of the same hue. - It is not a status light. A light, a square with an ink edge, means presence; a check means read, so the two never look alike (Status).
- It sits in the indicator's place at the mention's top right: its top on the mention's top, its 10px box starting 2px after the name's text, so it never covers the name. The mention reserves 10px after its text, as for the indicator, so the next word never runs under it and the line keeps its height; the check's box ends 2px into the word space, where the glyph has only its own empty padding.
- Decided by stdrc on 2026-10-24: the online light with an ink check read as a black frame, too dark for a mark that only confirms; just a check. Lime alone is 1.64:1 on white, so light mode uses
palette-lime-700and dark mode keeps the online lime. It replaces the online light with an ink check (artin and stdrc, 2026-10-23, option Ik2 on the mention read mark board), which had replaced a muted check after the name that read as part of the text.MessageReferenceReadMarkkeeps its name and its API and now draws the bare check; it is stable, exported from@botiverse/raft-ui, and still re-exported from@botiverse/raft-ui/wipfor existing imports.
Variants
States
Sent by an assistant
A person's assistant can send a message as that person: the message is theirs, and two marks say the assistant sent it (Identity and presence). The parts are experimental, exported from @botiverse/raft-ui/wip until the design is approved: MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByName and MessageItemDelegatedByButton. Put MessageItemDelegatedAvatar in the sender's md Avatar, with the assistant's 2xs Avatar in it, and MessageItemDelegatedBy after MessageItemSenderGroup; keep the sender in the group, which holds its 3rem. On a continuation row, put MessageItemDelegatedBy at the end of the text, as with MessageItemEdited, without the face. Such a message starts its own group (Conversation).
When the assistant has been deleted, keep both marks: the default face in MessageItemDelegatedAvatar deleted, which grays and fades it over the row's surface, and "sent by a deleted assistant" as plain words in MessageItemDelegatedBy, without a name part, so none of it truncates or opens anything:
Only a message an assistant sent for its owner can be retracted, by the owner. A retracted message stays in the timeline as a single record that can't be acted on:
- It keeps its sender, time, both marks (the face and "sent by Friday") and its thread replies, which people wrote and which stay readable.
- Its body is one line in
foreground-hint, "This message was retracted.", in place of the text. It isn't the person's words: it isn't Markdown, can't be selected to quote and isn't translated. - Its attachments, link previews, quoted messages and reactions are gone, and so are the hover toolbar (react, reply in thread, save, forward, more), the context menu and the long-press menu.
- Wherever it is quoted, the quote shows the same line, styled like an unavailable quote (MessageQuotedPreview); an Activity row or a search result shows the same line as its excerpt, never the old text.
In an Activity row or a search result there is no face; write the words into the sender: "Alice (sent by Friday)".
Behavior
- Put something small that ends the message in
MessageItemTrailing, never in a column beside the body (Trailing). - Space messages by grouping, on the timeline rhythm: 8px between the rows of one group (a continuation row sits under the row it continues) and the message step, 16px, before a new group. Every row keeps the row inset, 4px, above and below its text, and the extra 8px before a group is a transparent top border the highlight doesn't paint. The recipe reads both from the timeline tokens (
py-timeline-row,border-t-(length:--spacing-timeline-turn)), so a change to the rhythm changes every row. So the hover, selected and search highlights sit evenly around the text on every row: when a continuation row had no top padding, its highlight touched the first line and left 8px under the last. - On hover the row lays
fill-subtleover itself, the subtle tier of every row: a message can be many lines tall and is read with the pointer resting on it, so the step is small and the text keeps its contrast (Hover and press). It used to be lighter than other rows (3%); now a message steps like the rows and cards beside it. A message has no press: the row is not an action itself, a click selects text or lands on a link, a name or a button in it. A search-hit or selected message keepsinfo-softon hover, and a located one doesn't answer hover while its highlight lasts. - While one of its popups is open (its context menu, from a right-click, the toolbar's button, or press and hold on a phone), the row lays
fill-subtleover itself, the same tier as its hover, so the two never stack. A phone has no hover, so this fill is the sign of which message the menu acts on; it stays lighter thaninfo-soft, so the message doesn't look selected. - The hover toolbar appears on hover, when focus is inside the row, and while one of its popups is open. It rides the top edge of the highlight, on the right. Focus on the row itself counts: when a jump started from the keyboard focuses the row, its toolbar shows, so a keyboard user sees the message's actions and reaches them with Tab, through the message's links and buttons.
- Hover never moves the message. The toolbar floats over the row's top right corner and nothing reflows to make room for it, so the line someone is reading stays where it was.
- The time belongs to the sender: who said it and when read as one, so the time follows the name, its badges and its role, never pushed to the far right. The one exception is a touch screen's time reveal, where dragging the conversation left brings every message's time in at its row's right edge while the finger holds it (Conversation).
- In a message column at least 48rem wide, the sender line keeps the right fifth of the row empty: everything on it, the description included, fits in the first 80%, and a long description truncates there (cindyz, 2026-11-13, slock #14749). The line is a label for the message, and a description running to the far edge read as a sentence across the page. The room is a share of the row, not a fixed length, so a wider window keeps more of it free. It is measured on the message's own column (
MessageItemContentis themessagecontainer), so a thread or any column narrower than 48rem keeps the full width, as a phone does. The header leaves the room as padding at its end, so the hover fade, drawn from the header's end under the toolbar, still covers the toolbar's corner and never the time. - The header keeps no room for the toolbar (stdrc, 2026-10-22). At rest the sender line has the full width, so the whole name shows even in a 360px thread; while the toolbar shows, the end of a sender line long enough to reach the corner fades out under it: the header masks everything from 4px left of the toolbar's left edge to its own end, after a 12px fade, so no letter shows cut below or beside the card, which reaches only part of the line's height.
MessageItemToolbarmeasures its own width onto the row (--mi-toolbar-width), so a toolbar with more or fewer actions masks exactly its width; nothing on the row moves. A row without a toolbar, such as on a phone, masks nothing. Keeping the room cut the name to a few letters in a narrow column all the time, to protect a corner that is covered only while the pointer is on that message; keeping it only on hover would reflow the line every time the pointer crosses a message. Slack and Discord work the same way. MessageItemToolbarmeasures its width as the toolbar shows, not when the row mounts. The pointer entering the row, or focus moving into it, writes the width in that event, before the frame that shows the toolbar, so the first frame already fades the right width; a popup opens from the toolbar only after one of the two, so it finds the width written. While the toolbar shows, one observer shared by the whole page watches it, so a button added while it shows is measured again; once the pointer and focus have left the row and no popup is open, it stops watching, and with no toolbar showing no observer is left. Every message renders a toolbar and only the one under the pointer or focus needs its width, so measuring on show keeps long lists cheap: a row mounts in one commit and keeps no observer of its own. Measuring every row on mount took a second commit and a ResizeObserver per row, thousands in a long channel. Until then the toolbar writes the width of five buttons (164px) onto its row when it mounts, a plain write that reads nothing, so should the toolbar ever show before it has measured itself, the row fades too much rather than too little; a row without a toolbar gets no width and masks nothing. The fade shows under exactly the conditions the toolbar shows under, so a width left on the row never fades a header without the toolbar over it: a touch screen without hover shows neither after a tap, and a tap that focuses a button inside the row shows both.- When the sender line runs out of room,
MessageItemSenderGroupgives way in a fixed order: the role truncates first, then the name. The badges stay whole beside the name, and the time never truncates (When a row runs out of room). Show the full name and role in a tooltip when they can truncate. MessageItemDelegatedBytakes its own width up to 45% of the line; past that, only the assistant's name truncates. When its words alone are wider than that ("sent by a deleted assistant" on a phone), it is as wide as its words and the sender's name gives way instead: the words never truncate and never run under the time. The sender's name keeps at least 3rem, or all of it when shorter; when even that doesn't fit (a 360px thread panel), plain words wrap onto as many lines as they need, their first line on the name's baseline, and the time stays on the first line. The words around the name never truncate: the product's spaces around the name are kept as written, and a translation with words on both sides of the name (Chinese) keeps both whole.
- The toolbar is 36px high on a touch screen, with 28px buttons, and 42px high with a mouse, with buttons at the control height (34px), like every desktop control (stdrc, 2026-11-05). Its icons are 16px, its buttons 4px from the frame and 4px apart, and its hairline is drawn inside that height. It rides the top edge of the highlight and reaches half its own height above it, 18px on a touch screen and 21px with a mouse, derived from the control height; on a group's first row the transparent 8px border takes part of that, so it reaches only 10px (13px with a mouse) beyond the row. On a continuation row it sits wholly above the row instead, its bottom edge on the row's top edge with no gap. A continuation row has no header to cover, so riding the edge put the toolbar over the first line of text, and a link at the end of that line could not be clicked while the row was hovered (huxijin, 2026-12-01; Kirby and Jasper). Where there is no room above, at the top of the scroll area or the window, it rides the edge as on a full row (
data-straddle, set as it shows). Its buttons areMessageItemToolbarButton, not Button. It stays this compact because it appears on every message under the pointer: at 38px it covered the sender line and was clipped above the first message. - The toolbar keeps
radius-container, like every popup. Its buttons are controls embedded in its frame, so they wearradius-chip, like the buttons in a field, the composer and a card corner; with a mouse, at the control height, they wearradius-control(Inside a frame). - Leave at least 18px (21px with a mouse) above the first message of a scroll area and above the root message of a thread, so the toolbar is never clipped. A timeline that opens with a date line already has the room.
- A task row under a message opens the task. Status changes in the task's details, not from the row (Tasks in a conversation).
Trailing
MessageItemTrailing holds something small that ends a message, such as the faces of the agents that read it with their read mark. Put it last in MessageItemBody:
- It takes no column, so a row without it has the body's full width (Desktop density; stdrc, 2026-11-05). It sits at the inline end of the body's last line, centred on it, and the last line keeps room for it: the text wraps under it only when that line is full. When the body ends with a block that isn't text (a code block, a table, an image), it sits on a line of its own under that block, at the end.
- It finds the body's last block itself (through a wrapper that only holds blocks, such as a markdown root) and marks it, and one observer shared by every slot keeps the room as wide as the slot. Don't reserve the room yourself.
- Where its content can arrive later (reads come in realtime), render the slot empty from the first frame, with the width of its smallest content (
min-w-*), so the room is there before the content and the row doesn't move when it arrives. A body that ends with a code block then keeps its line under the block from the start. - It is not
MessageItemReadReceipt: the footer's read receipt says that the people a message mentions have read it, a marker beside the reactions; the trailing slot shows where each agent stopped reading, on the last message it read. - Known limits: a last line that ends in a line break gets one more line; a paragraph with
dir="auto"in the other direction than the body puts the room at the wrong end; in a collapsed long message the slot is hidden with the body's end.
Toolbar for selected text
Text the person selects in a message gets a TextSelectionToolbar, with actions such as Quote and Copy. It is built like the hover toolbar, so the two read as one kind of thing; the one difference is that its buttons have text labels. Its look, its placement on the selection's focus line and its labels are in its own doc.
Content
- Write the continuation time as the hour and minute only, in the person's 12-hour or 24-hour format, without AM or PM: 6:35, 18:35 (Writing). The gutter is the avatar's 35px column, and a two-digit hour (10:35, 18:35, 36.7px in Space Mono) reaches about 2px past it into the row's padding: the time is right-aligned to the text, so that is where it belongs. Don't widen the gutter for it, because that moves every message's text off the avatar column.
- Write what
MessageItemMetaholds in sentence case; leave it out when there is nothing (Member labels). - Put
MessageItemEditedinside the last paragraph of the text, so it follows the last word ("(edited)"), and give it the edit time as its tooltip. It sits in the text, not in the header, because a continuation row has no header and an edit belongs to that one message. - Label each reaction chip with the reaction, the count and whether the person is among them.
Accessibility
MessageItemand its parts are plain elements built with Base UIuseRender; userenderto change the element, such as a link onMessageItemSenderButton.MessageItemis anarticlenamed by its sender and its time: itsaria-labelledbypoints atMessageItemSender(orMessageItemSenderButton) andMessageItemTime(orMessageItemContinuationTime), whichever the row renders, with ids raft-ui generates. A screen reader that lands on a message, by a jump or by its reading keys, announces an article named "Atlas 2:20 PM" before the text: whose message it is and when, in the order the header shows them. A continuation row shows no name, so it is named by its time. A row with neither, such as a receipt card in the text column, is a plaindiv, not an article: an article with no name is announced as a bare "article", which tells a screen reader user nothing; give itaria-labelif it should be one. Passaria-labelledbyoraria-labelto name a row yourself, androleto change the role, onMessageItemor on itsrenderelement; arenderfunction's props can't be read, so with one, pass them onMessageItem. Anidyou give a part is the one the row points at. A sender button's name is its visible name, so don't give it anaria-labelof its own: the row would read that instead.- Don't put messages in a
listor renderMessageItemas anli:role="article"replaceslistitem, and a list may hold only list items. The timeline around them takes no list role (MessageList). Don't make it afeedeither: a feed promises Page Down and Page Up from article to article, which the timeline doesn't implement. - A row takes focus only when a jump started from the keyboard lands on it (Located). raft-ui doesn't make the row focusable: the caller sets
tabIndex={-1}onMessageItembeforefocus({ preventScroll: true }), and removes it when focus leaves, so a later click on the row doesn't take focus from the composer. It shows the inset ring then, never the browser's outline, and its toolbar; Tab goes on through the message's links and buttons, the toolbar's included. While the toolbar shows, its card covers part of the ring's top edge at the right, as it covers the highlight's: the ring still reads on the other three sides and most of the top, and moving the toolbar off the row's edge for focus alone would make it jump. MessageItemTrailingcomes after the text in the DOM, so a screen reader reads it after the message, never in the middle of a sentence. It can't be selected, so copying a message copies its text without the faces; name what it shows (aria-labelon its group).- Give every
MessageItemToolbarButtonanaria-labelin sentence case: Reply in thread, Save. The toolbar shows on keyboard focus, so Tab reaches it. - Each
MessageItemToolbarButtonshows itsaria-labelas a Tooltip on hover and on keyboard focus, as every icon-only button does (Button); pass the key inshortcut(aKbdShortcutatsm) and it follows the name. A tap shows none, so a touch screen never sees one. Passtooltipto say something else, ortooltip={false}to leave it out. A button that already renders as a caller's ownTooltipTrigger, such as the quick reaction button, adds none, so it never opens two. The open tooltip doesn't count as one of the row's popups: the toolbar still hides once the pointer and focus leave the row. - Name the quick reaction button for what a click does: "Like" with 👍, "React with 😂" with another emoji, and "Remove like" or "Remove 😂" once the person has given it, with
aria-pressedand the selected look of their own reaction chip. That hovering opens the picker goes in its tooltip, not in its name (Conversation). MessageReactionChipwraps Base UIToggle:aria-pressedsays whether the person reacted. Give it anaria-label; the drawn reaction inside is hidden (Brand).- Put the reason a reaction failed in
MessageReactionErrorIndicator, a visually hiddenrole="status". - Give the toolbar over selected text an
aria-label(TextSelectionToolbar). - Give
MessageMultiSelectCheckboxa label that names the message, such as "Select message from Bugen". - Render a reference chip that opens something as a link, through
render; the chip is aspanby default. An app link opens in a new tab, withrel="noopener noreferrer". - Give an app's icon in
MessageReferenceIconan emptyalt: the title beside it names the link. - Give the avatar image an empty
alt: the name beside it already says who it is. MessageItemDelegatedAvatarisaria-hidden: "sent by Friday" is plain text in the header, read in its order (name, role, "sent by Friday", time). When a product names the whole row (aria-label), it uses the same words.MessageItemDelegatedByButtonis a<button>; render it as a link throughrenderwhen it goes to a profile page.- While the toolbar shows, what fades out under it (the time, "sent by") can't be pointed at: the time's tooltip and
MessageItemDelegatedByButtonare reachable once the pointer leaves the toolbar, and always by keyboard, where they stay in the reading order. - Give
MessageItemTimeandMessageItemContinuationTimethe moment indateTime(ISO 8601), and the full date and time in a tooltip. A screen reader reads the header in the order it shows: name, badges, role, time. - The time a touch screen reveals when the conversation is dragged left is
aria-hidden: the row's name already carries its time, so a screen reader would read it twice (Conversation). Every row that is an article has its time in its name, a continuation row included.
Rules
- Put
MessageItemDelegatedAvataronly on a person's avatar, never with a presence light (Avatar). - Don't frame a message, and don't give agents a bubble color. Only what is embedded (code blocks, attachments, action cards) looks like a card.
- Put the reactions first in the footer, with the add button last.
- Put the tasks created from a message above the footer, as a list of compact rows, not as a marker in the footer (Rows in a compact list).
- Show one reaction chip per emoji. Put a reaction the person added on
attention-soft. - Keep a chip's ink as far from its left edge as from its right (Alignment). A reference chip with an icon and a reaction split their padding evenly, 4.5px and 7px at each end, the same total and width as before: a Lucide icon leaves about as much space in its box as a letter beside it, and an emoji or an app's icon is drawn to its edges. The saved marker takes 5.5px before its bookmark, which is drawn 2.3px inside its box, and 6.5px after its text.
- Put a note after a reference chip's label in
MessageReferenceSuffix, not in a span of your own. It stays on the label's baseline in the layout and is drawn a quarter of the size difference higher, so the middles of the two x-heights meet; the label stays on the sentence's baseline. - Make a reaction chip 24px tall, with a 44px hit area (Spacing).
- Make the saved marker the reactions' height, 24px, in the footer's type,
text-footnotebold (13px on a desktop), with muted text onfill-muted. It shares a row with the reactions and the replies below it share its fill, so a smaller, lighter label (it was 22px at 12px semibold) read as a fainter grey though the colors were the same (stdrc, 2026-10-31).
API
MessageReferenceChip
Also takes the attributes of its element.
MessageReferenceIndicator, MessageReferenceLabel
Also takes the attributes of its element.
MessageReferencePending
Also takes the attributes of its element.
MessageReferenceReadMark, MessageReferenceSuffix
Also takes the attributes of its element.
MessageReferenceText
Also takes the attributes of its element.
MessageReferenceUnavailable
Also takes the attributes of its element.
MessageItem
Also takes the attributes of its element.
MessageItemAttachments, MessageItemAvatarSlot
Also takes the attributes of its element.
MessageItemBadge
Also takes the attributes of its element.
MessageItemBadgeSeparator, MessageItemBody, MessageItemContent, MessageItemContinuationTime, MessageItemEdited, MessageItemEmbedded, MessageItemFooter, MessageItemGutter, MessageItemHeader, MessageItemInlineStatus, MessageItemMeta, MessageItemReadReceipt
Also takes the attributes of its element.
MessageItemSavedIndicator
Also takes the attributes of its element.
MessageItemSearchMatch, MessageItemSender, MessageItemSenderBadges, MessageItemSenderButton, MessageItemSenderGroup, MessageItemTime, MessageItemToolbar
Also takes the attributes of its element.
MessageItemToolbarButton
Also takes the attributes of its element.
MessageMultiSelect
Also takes the attributes of its element.
MessageMultiSelectCheckbox
Also takes the attributes of its element.
MessageReactionAddButton
Also takes the attributes of its element.
MessageReactionChip
Also takes the attributes of its element.
MessageReactionCount, MessageReactionErrorIndicator, MessageReactionGlyph
Also takes the attributes of its element.
MessageReactionPickerContent
Also takes the attributes of its element.
MessageReactionPickerStatic, MessageReactionQuickButton, MessageReactionQuickRow
Also takes the attributes of its element.
MessageReactionTooltipContent
Also takes the attributes of its element.
MessageReactionTooltipMeta, MessageReactionTooltipName, MessageReactionTooltipNames, MessageReactionTooltipNameText, MessageReactionTooltipSeparator
Also takes the attributes of its element.
MessageItemDelegatedAvatar
Also takes the attributes of its element.
MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName, MessageItemTrailing, MessageReferenceIcon
Also takes the attributes of its element.
Related
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 inMessageRepliesSummary, a mention of you (MessageReferenceText variant="primary"), and theStepsnumber. - 0.101.0 · Breaking Changes
MessageMultiSelectToolbar,MessageMultiSelectToolbarActions,ActivityInboxSelectionToolbarandActivityInboxSelectionCountare removed ([SelectionToolbar](https://raft-design.botiverse.build/components/selection-toolbar/)). Their props types (MessageMultiSelectToolbarProps,MessageMultiSelectToolbarActionsProps,ActivityInboxSelectionToolbarProps,ActivityInboxSelectionCountProps) go with them.MessageMultiSelect,MessageMultiSelectCheckboxandActivityInboxControlsstay. - 0.35.0 · ChangedA search hit (
searchHit:MessageItemSearchMatch,MarkdownMark,SearchMessageResultMatch) is ayoufill with ink type, in the surrounding weight, with no ink ring, and 1px of fill above and below so descenders stay inside it. A mention of you keeps its sticker. - 0.34.0 · Changed
MessageReferenceReadMarkis a bare 10px Lucide check (stroke 2.5) inread-mark, with no light and no box, 2px after the name; the mention reserves 10px after its text, as for the indicator. The API is unchanged. - 0.29.0 · Changed
MessageReferenceIndicatorplacement:right: -10px(was-6px) andtop: 0; the mention keeps 10px after its text (was 8px), so the corner mark no longer overlaps the last letter. - 0.29.0 · Changed
MessageReferenceReadMarkis exported from@botiverse/raft-ui(still from/wiptoo) and draws the online light with a check; its API is unchanged (children are what a screen reader says). - 0.25.0 · Design SystemAn app link shows its host wherever a touch can open it: a chip for a link that an app previews shows the link's host after its title (
MessageReferenceSuffix) on any device with touch input, including a laptop with a touch screen. Write the full host, dropping only a leadingwww., never shortened to the registered domain, and an internationalized host in its ASCII form (xn--…). The title truncates first; if the host alone still doesn't fit, it loses its start, never its end. It applies to MessageItem and MessageReference. - 0.25.0 · Design SystemAn app link is a plain link until Raft knows an app previews it: before a message's previews are first read, an app's link is an ordinary link. Once someone allows an app's previews and Raft reads them again, each of that app's links is
MessageReferencePending cappeduntil its preview arrives. It applies to MessageItem.