Components · Inbox
InboxItem
The row for something that happened elsewhere and that the person should see — a mention, an approval, a hand-off — with an attention dot while it is unread and its actions in the row.
import { InboxItem } from "@botiverse/raft-ui";An InboxItem is one thing that happened elsewhere and that the person should see: someone mentioned them, an agent waits for their approval, work was handed to them. An unread item has a bold title and a pink attention dot; an action it needs sits in the row. It is the row of ActivityInbox.
When to use
Which message goes where is in Choosing a component.
Anatomy
InboxItem: the row. Required.InboxItemTrigger: an invisible button that covers the whole row and opens the item. Required.InboxItemSelection: a Checkbox for selecting several items. Optional.InboxItemLeading: a 35px leading visual (the avatar column,avatar-column-size) before the text: the person's or agent's avatar, or an IconTile holding a channel's icon or a thread's or task's mark. Optional.InboxItemLeadingBadge: the badge in the bottom-right corner of the avatar or tile, holding one icon: on a thread or task in a channel, the channel's own icon; on a thread in a direct message,ThreadIcon(Icons), or Lucide'slist-todoon a task. Only on a thread or task row (The leading image). Optional; experimental, from@botiverse/raft-ui/wip.
InboxItemContent: the text column. Required.InboxItemContext: where it happened: a channel, a task, a computer.InboxItemHeadingwithInboxItemTitle: what happened, with an optional 14px icon before it.InboxItemTimestamp: the time, after the title, in a compact row withInboxItemLine. Optional. It takes the pointer there, so it can be a tooltip's trigger with no wrapper, and a click on it still opens the item. Withreveal="hover", with a mouse, it is hidden at rest and shows in the same place while the row is hovered or it or a control in it holds keyboard focus; on a touch screen, where nothing hovers, it shows at rest.
InboxItemSubtitle: a second line of context, such as "Thread in #launch-week".InboxItemBodyorInboxItemMessage: the excerpt, starting withInboxItemSender.InboxItemLocation: where a thread or a task is, "#launch-week ·", inforeground-hint, at the start of theInboxItemBody, beforeInboxItemSender. Optional; experimental, from@botiverse/raft-ui/wip.
InboxItemLine: the excerpt's line in a compact row with no trailing column: the excerpt, which takes the room, thenInboxItemMarks. It is what puts the row in this layout, with both lines running the full width. Optional; experimental, from@botiverse/raft-ui/wip.InboxItemMetadata: chips for the task, replies and mentions.InboxItemHoverTarget: wraps a badge that has a tooltip, so the pointer reaches it (the rest of the text lets the pointer through to the trigger). A click on it still opens the item.InboxItemActions: last in the content, in a compact row withInboxItemLine. Withreveal="hover"it centers on the row, andInboxItemContentends both lines short of it by--inbox-item-actions-room(40px with a mouse, 44px on a touch screen): room for one button. For more, set that variable on the row.
InboxItemTrailing:InboxItemTimestamp,InboxItemActionsand, while unread, the attention dot. Left out of a compact row withInboxItemLine.InboxItemMarks: marks at the end of the excerpt's line: a mention, muted, an unread count. InInboxItemLinein a compact row that has it. Optional.InboxItemStatus: a task's status, in the marks. Itsstatusand its word aschildren. In a row withInboxItemLineit shows the status's pixel, with the word in a tooltip, when the row is narrower than 360px or when the word would leave the message too little room (Rules); it measures its line for that when the line's text, children, classes or width change. Pass it anidto name the word in the trigger'saria-labelledby. Optional; experimental, from@botiverse/raft-ui/wip.InboxItemStatusWordandInboxItemStatusPixel: the two halves ofInboxItemStatus, the chip with its word and the pixel, for a status that needs more than a word and a tooltip repeating it: a tooltip of its own on the word, a longer name for a screen reader beside the word on screen, its ownidor data attributes. Use them in place ofInboxItemStatus, always together, both in theInboxItemMarksof anInboxItemLine. The pixel is what measures the line: a word without its pixel is never measured, so it keeps its word however little room it leaves the message, and in a row narrower than 360px it hides with nothing in its place. Name the pixel witharia-label. Either can be aTooltipTrigger'srender, and either takes arenderof its own: give the word<InboxItemHoverTarget />so it takes the pointer, as the pixel does by default. The word's classes anddata-inbox-item-status-word, and the pixel's classes,role="img"anddata-slot="inbox-item-status-pixel", stay whatever their props or theirrendersay. Optional; experimental, from@botiverse/raft-ui/wip.
InboxItemListGroup: one day's or one group's heading and rows, straight in the list's column. A sticky heading stays inside its parent, so with a group per day the next heading pushes the last one out. Optional; experimental, from@botiverse/raft-ui/wip.InboxItemListHeading: the group's heading, anh3by default. To keep it in view while its rows scroll, the list makes it sticky and gives it the list's surface. Optional; experimental, from@botiverse/raft-ui/wip.
InboxItemSkeleton, in anInboxItemSkeletonList: a row that stands in for anInboxItemwhile the list loads (Loading).linematches compact rows withInboxItemLine. Optional; experimental, from@botiverse/raft-ui/wip.
The leading image
The leading image shows what the row is. A channel or a direct message leads with itself. A thread or a task in a channel leads with its own mark, and the channel it lives in moves to the corner badge: the row reads as a thread or a task first, and still says what kind of channel it is in. A thread in a direct message keeps the other side's face, with the thread mark in the corner (cindyz, stdrc, 2026-10-30; the same on web and in the app):
- A channel shows its own icon, from the same source as the sidebar and the channel header, so a channel reads the same on every surface (cindyz, 2026-11-10): the icon that says who can read the channel:
hashfor the server, the private lock (riconsPrivateIcon) for its members only,users-roundfor people outside the server too (every joint channel included), a chat app's mark for a connected channel andglobefor one readable on the public page (Raft Chat channel). It is on the tile of the channel's own row and in the badge of its threads' and tasks' rows. A bare#on a joint or private channel says it is an ordinary one, on its own row and on its threads' and tasks' rows alike. - A thread or a task in a channel leads with its own mark:
ThreadIconor Lucide'slist-todo, the same marks the rest of the product uses for a thread and a task, in the same IconTile a channel's row uses. The channel's icon goes to the badge, at the badge's size; swap the two, never add a third mark or a new size. - In a direct message, show the face, not a channel shape. A
#anywhere on a thread in a direct message would say the thread lives in a channel. The avatar says who the conversation is with, and it is the face the person already knows from that direct message, so it stays the leading image and the thread mark goes to the badge. - The badge is the same on a tile and on an avatar: the same size, in the same corner; only its icon changes.
- On an avatar, the badge takes the presence light's corner. One corner holds one mark (Avatar). The row is about the thread, not about how the agent is doing now, so the badge wins and the thread row shows no presence light. The light stays on the direct message's own row.
- The second line doesn't repeat the leading image. In a direct message the avatar already names the other side, so "@Lagoon · Lagoon: …" says the name twice; the line starts with the latest message. A tile doesn't name its channel, so a channel thread keeps "#channel ·" before it.
- A screen reader still hears where the thread is. The row's trigger
aria-labelkeeps the conversation's name ("Thread in a direct message with Lagoon: …") even though "@Lagoon ·" is no longer on screen, so someone who doesn't see the avatar still knows which direct message the thread belongs to. - Until the direct message has loaded, lead with an
IconTileholdingDirectMessageIcon, withThreadIconin the badge, never a#tile or a#badge: the row must not claim a channel it isn't in, even for a moment. - The thread follows its conversation's settings. A thread in a muted direct message is muted too, the same as a thread in a muted channel.
Variants
In density="compact", in a row built from InboxItemLines (the line layout), the time sits at the end of the title's line and InboxItemMarks at the end of the latest message's line, each taking room on its own line only (Times in list rows). A row that still uses InboxItemTrailing keeps the time and the marks in that column, one beside each line, until it moves to the line layout. The unread count there says the row is unread, so data-unread only makes the title bold and there is no attention dot. Leave data-unread off a muted conversation and show a muted mark in place of its count.
States
Loading
While the list loads, show InboxItemSkeleton rows in an InboxItemSkeletonList. Each one is an InboxItem built from the loaded row's parts, with a bar in each line in place of its text, so it has the loaded row's padding and line heights and nothing moves when the items arrive (Feedback). Give it the shape of the rows it stands for: context for a context line, leading for an avatar or tile, and the same density. The list shows its rows only once the wait passes 1 second, and is empty until then: a list skeleton is only for a slow load, so it waits by default (Feedback). Pass delay={0} to show them at once. Mark the region that stays when the items arrive, such as the panel or the viewport, aria-busy while the list loads.
Behavior
-
The trigger covers the whole row. Buttons in the row sit above it, and each one can be pressed on its own.
-
Draw no line between items. An item is a list cell (Lists): it runs the list's full width, and its hover, press, menu-open and
activefills, the located highlight and the focus ring sit on one rounded shape as tall as the item and inset 8px from each side. Put the items straight in their scroller (ActivityInboxViewport), with no side padding: it is a column with a 2px gap and 8px at its top and bottom, so two filled items show 2px between them and the first and last sit 8px from its ends. A list inside another container is aflex flex-col gap-0.5 py-2column. -
Pad the content from the shape: 12px inside it at the start and at the end, 20px from the list's edges (with a mouse on a desktop 8px inside it, 16px from the edges), and 8px at the top and bottom with every pointer and at every width (
list-row-inset, shared with the apps), as a search result; on a touch screen the item is also at least 56px tall (list-row-min-height) (Lists). A narrow window with a mouse had 12px, a breakpoint's accident, not a decision (Kirby, 2026-11-23, #proj-raft-ui:#293). The avatar or tile and the selection checkbox start at the shape's inner start; the time, the marks (the muted mark, a count, the @ sticker), the attention dot and Mark as Done when it shows on hover end at its inner end, so none of them touches the shape, hovered, pressed,activeor focused. Don't set the item's inline padding or move its shape (before:right-*) from outside; a long title or preview truncates at the padding. -
A press shows the press fill at once, on a touch screen the same as with a mouse.
-
With a mouse, show Mark as Done only while the row is hovered, holds focus, is
activeor has a menu open: giveInboxItemActionsreveal="hover". A list where every row shows its button reads as a wall of buttons, and the row itself is the main target. While the actions show, in the line layout (InboxItemLine) the time and the marks move left to make room and stay in view, and the attention dot steps aside (Lists); in a row that still usesInboxItemTrailingthe time, the marks and the dot step aside, fading out, until it moves to the line layout. -
On a touch screen, show Mark as Done at rest and put it in the press-and-hold menu too; a swipe may add a shortcut but never replace it (Responsive layout).
reveal="hover"does this: on a touch screen the button shows at rest, and the rest ofInboxItemTrailingmoves over to make room for it. -
On a touch screen, at any width, Activity rows leave it out at rest: Mark as Done is the first of the buttons the left swipe uncovers, and the press-and-hold menu's item (stdrc, 2026-10-23, for a phone; artin, 2026-11-30, #proj-mobile:#481; web follows (Kirby, #proj-raft-ui:295d143e), for every touch width), so leave
InboxItemActionsout of the row there, but keep the button for screen readers, visually hidden (sr-only) at the end of the row. A screen reader can't swipe a row, and the web has no way to give a row an action of its own; as a hidden button it is the next thing after the row. Name it after its row ("Mark #launch-week as Done"), so a list read aloud doesn't repeat one name, and show it while it has keyboard focus (focus-visible:not-sr-only), so Tab on a touch screen with a keyboard never lands on something unseen. With nothing at rest at the row's end, the time and the marks end on the content's edge. It is the same button a mouse reveals on hover, and pressing it does the same. The swipe's buttons (Done in solidsuccesswith ink, the row's other actions infill-muted), its distances (open past half the buttons, Done past 60%), its tick on Android and its 8-second Undo are in Responsive layout. raft-ui has no swipeable row yet; until it does, the product draws the swipe around the row. -
In the line layout (
InboxItemLine), the time takes room only on the first line ofInboxItemContent, and the marks only on the line they end; every other line runs the full width (Times in list rows). A column beside several lines takes the width of its widest part from each of them, which made a phone's narrow rows wrap more and grow taller. While the hover actions show, centered on the row, the lines beside them make room for them. -
data-unreadturns on both the bold title and the attention dot. In the default density the dot is how an unread item reads; keep it. Indensity="compact"the unread count inInboxItemMarkstakes its place, so the dot is off. -
The text lets the pointer through to the trigger, so a badge there gets no hover. Wrap a badge that has a tooltip in
InboxItemHoverTarget. -
On a touch screen (
pointer: coarse, at any width) each action inInboxItemActionskeeps a 44px target and the actions spread 12px apart so their targets don't overlap; with a mouse they stay 32px, 2px apart.
Content
- Write the context line as where it happened: #launch-week · task #25.
- Write the title as who did what, with a teammate verb: "Martin needs your OK", "Bugen handed off #25" (Writing).
- Keep the excerpt to at most 2 lines.
- On a thread or task row in a channel, start the second line with the channel, in
InboxItemLocation: "#launch-week · Martin: …". Use the task's address ("#launch-week:#46 · Martin: …") only where the product shows task numbers in its rows; Raft Chat's Activity doesn't on a server with task v2 conversations (Raft Chat). The badge says the channel's kind, not its name. In a direct message, start it with the latest message: "Bugen: …" (The leading image).
Accessibility
- The parts render native elements through Base UI's
useRender.InboxItemTriggeris a nativebutton; withdisabledit getsaria-disabledand ignores clicks. - Give the trigger an accessible name that names the item:
aria-label="Open Martin needs your OK". Setaria-currenton the trigger of the open item. - Name the selection checkbox and every icon-only action:
aria-label="Select activity item",aria-label="Mark as Done". - Actions with
reveal="hover"stay in the tab order while hidden, and show as soon as focus reaches the row or them. - When a jump started from the keyboard lands on an item, such as Back to the list the item was opened from, move focus to its
InboxItemTrigger, not to the row (Located): the trigger is already a focusable button with the item's name, and the row draws the inset ring around it, so the row needs notabIndexof its own. - The attention dot is drawn in CSS and isn't announced. Say "unread" in the trigger's name, or add a visually hidden word.
- An
InboxItemTimestampwithreveal="hover"isn't announced while it is hidden. Say the time in the trigger's name. InboxItemStatus's word isn't on screen while the status shows only its pixel. Add itsidto the trigger'saria-labelledby: a label reads a hidden element it names directly.- With
InboxItemStatusWordandInboxItemStatusPixel, a word that needs a longer name for a screen reader keeps the short one on screen in anaria-hiddenspan and the longer one in a visually hidden span after it. Give the pixel the same longer name inaria-label. InboxItemLeadingBadgeis hidden from assistive technology, and so is the tile's icon. Say "thread" or "task" and where it is in the trigger's name:aria-label="Open thread in #launch-week",aria-label="Open thread with Lagoon".InboxItemSkeletonis hidden from assistive technology.InboxItemSkeletonListisn'taria-busy: it goes away when the items arrive, so a screen reader would never hear it finish. Putaria-busyon the container that stays, such asActivityInboxPanel, while the list loads.
Rules
- Never make an action in the row pink: a list can hold several items that wait for the person at once (Button).
- Make the hover-revealed actions (
InboxItemActionswithreveal="hover") ghost buttons, centered on the row's height, not on its first line; keep actions shown at rest ink-outline small buttons: on a touch screen, and in a row that waits on the person (Lists; stdrc, 2026-11-05, #proj-raft-ui:e09717fb). - In a row built from
InboxItemLines, when the hover actions appear, move the time and the marks left by their width plus 8px; never fade or hide them, so the time stays in view (Times in list rows). A row that still usesInboxItemTrailingkeeps today's behavior, the time and the marks fading out while the actions show, until it moves to the line layout. - In a row built from
InboxItemLines, on a touch screen, where an action shows at rest as an ink-outline small button (not Activity's Done, which has none at rest there), leave 12px between it and the time and the marks, not 8px: its 44px target reaches 6px past each edge of the 32px button, so 8px would leave 2px between the target and the time's text, which opens the row when tapped. 12px is the same space as between two actions on a touch screen (Behavior; Jasper, 2026-11-05, #proj-raft-ui:#196). - In a row built from
InboxItemLines, put the time on the first line only (the title's line indensity="compact"), and the status marks (a task's status, the draft mark, the @ sticker, the muted mark, the count) at the end of the second line, which otherwise runs the full width (Times in list rows). - In a list grouped by day, show the time at rest on today's rows and on any row less than 1 hour old, even under Yesterday (now, 3m, 2h); show an older row's clock time with a mouse only on hover or keyboard focus, and on a touch screen at rest; say every row's time in words in its trigger's name (Times in list rows).
- Set a thread's or task's place before its excerpt, "#launch-week ·", in
InboxItemLocation: inforeground-hint, so the eye lands on who spoke and what they said. In the one-line row it doesn't cut on its own: the line's one ellipsis ends the row, as before. When it was cut on its own at 60%, a short name like "#launch-week" lost letters in a phone row with a status and a count, and the message was left only an ellipsis. In an unread row the place stays hint, whatever color the message takes (artin, 2026-12-01, #proj-mobile:08ad599e). - In a row narrower than 360px, show a status by its color mark only, with its word in a tooltip and in the trigger's name (Wide and narrow). Do the same in a wider row when the word would leave the message less than the larger of its place and its sender with 4em more (the first letters of what was said and the ellipsis) and 10rem: in a phone's task row, "Waiting on you" and a count left the message "#launch-week · Mira:…", with not one word of what was said.
InboxItemStatus, or theInboxItemStatusPixelbeside anInboxItemStatusWord, measures this itself, on the line, never on the message: the message's width is what the status leaves it, so a condition on it would switch back and forth (the pixel gives the message the word's room, and with that room the word comes back). It measures what the word needs (the other marks, the word, the place and the sender, all as if the word were shown) when the line's content changes, and compares the line's width with it when the line is resized, so each width has one answer. It uses the line's width at rest: the room hover-revealed actions take while they show is given back, so pointing at a row or selecting it never changes its status. - Lead with who, when there is a who: the person's or agent's avatar. A notice from the system has no who; see NotificationCenter.
- Lead a thread or task row in a channel with the thread's or task's own mark in an IconTile, with the channel's own icon in the badge. Lead a thread or task in a direct message with the other side's avatar, with the thread's or task's mark in the badge. Never give a thread in a direct message a
#tile or badge, and never show a presence light on a thread or task row (The leading image). - Load a list of items as flat
InboxItemSkeletonrows, never as cards: no border, card or gap the loaded list doesn't have (Loading).
API
InboxItem
Also takes the attributes of its element.
InboxItemActions
Also takes the attributes of its element.
InboxItemBody, InboxItemContent, InboxItemContext, InboxItemHeading, InboxItemHoverTarget, InboxItemLeading, InboxItemMarks, InboxItemMessage, InboxItemMetadata, InboxItemSelection, InboxItemSender, InboxItemSubtitle
Also takes the attributes of its element.
InboxItemTimestamp
Also takes the attributes of its element.
InboxItemTitle, InboxItemTrailing, InboxItemTrigger, InboxItemLeadingBadge, InboxItemLine, InboxItemListGroup, InboxItemListHeading, InboxItemLocation
Also takes the attributes of its element.
InboxItemStatus
Also takes the attributes of its element.
InboxItemStatusPixel
Also takes the attributes of its element.
InboxItemStatusWord
Also takes the attributes of its element.
InboxItemSkeleton
Also takes the attributes of its element.
InboxItemSkeletonList
Also takes the attributes of its element.
Related
Changes
- 0.102.10 · ChangedInboxItem: on a touch screen, an
InboxItemTimestampwithreveal="hover"(an older row's clock time in a list grouped by day) shows at rest; with a mouse it still shows only on hover or keyboard focus. - 0.63.0 · AddedInboxItemTimestamp:
reveal="hover", for an older row in a list withInboxItemLine: the time is hidden at rest and shows while the row is hovered or holds keyboard focus; never on touch. In a compact row's heading the time can carry a tooltip, and a click on it opens the item. - 0.63.0 · AddedInboxItemSkeleton and its list: a
lineprop, so a loading row matches a row withInboxItemLine. Off by default. - 0.54.0 · Design SystemActivity thread and task rows lead with their own mark; the channel's icon goes in the corner badge.
InboxItemLeadingBadgeholds any one icon. - 0.49.0 · ChangedSidebarItem, InboxItem, SearchEntity/SearchHit rows: list cells, no dividers; their lists (
SidebarList,SearchResultsList,ActivityInboxViewport,InboxItemSkeletonList,DialogNav) space rows withgap-0.5 py-2. An app that drew its own row padding or right inset on these rows should remove it. - 0.9.5 · FixedOn a touch screen, a tap no longer leaves a hover highlight on:
TableBodyrows, anInboxItem's pressed toggle action, the Activity inbox sort button and aFileRow(when itsFileRowOpenis hovered) now only show their hover on devices that can hover. With a mouse they look and behave as before. - 0.9.2 · FixedOn an
InboxItemcard row,InboxItemTrailing(the timestamp, and on a touch screen the room forreveal="hover"actions) takes width only beside the first two content lines; the body, message and chips below run the full width. Before, every line was narrowed, so phone cards wrapped more and grew taller. Compact rows and rows without a trailing column are unchanged. - 0.9.1 · Added
InboxItemActions reveal="hover": with a mouse, the actions stay hidden (still reachable by Tab) until the row is hovered, focused, active or has a menu open, and the timestamp, marks and dot step aside while they show. On a touch screen they show at rest and the trailing column makes room.