Components · Content
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.
Also called Inbox
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
| Situation | Use |
|---|---|
| Something happened elsewhere that the person should see | InboxItem, in Activity (ActivityInbox) |
| The state of the whole workspace: a computer offline, a quota nearly full | A notification (NotificationCenter) |
| The result of an action the person took | Toast |
| Something to read before acting, in a dialog or form | Banner |
| A conversation, a setting or a member in a list | ListRow |
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.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.InboxItemSubtitle: a second line of context, such as "Thread in #launch-week".InboxItemBodyorInboxItemMessage: the excerpt, starting withInboxItemSender.InboxItemMetadata: chips for the task, replies and mentions.
InboxItemTrailing:InboxItemTimestamp,InboxItemActionsand, while unread, the attention dot.
States
| State | Look |
|---|---|
Unread (data-unread on InboxItem) | The title in foreground at weight 700, and a pink attention dot on the right |
| Read | The title in foreground-muted at weight 600; no dot |
active | The item open beside the list: an info-soft wash |
disabled | No hover, no press; the trigger can't be pressed |
Behavior
- The trigger covers the whole row. Buttons in the row sit above it, and each one can be pressed on its own.
- Divide items with
line-hairline, starting at the text.
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.
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". - The attention dot is drawn in CSS and isn't announced. Say "unread" in the trigger's name, or add a visually hidden word.
Rules
- Use ink-outline small buttons for actions in the row, never pink: a list can hold several items that wait for the person at once (Button).
- 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.
API
InboxItem
| Prop | Type | Default |
|---|---|---|
| boolean | false | |
| boolean | false | |
| Allows 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.
InboxItemActions, InboxItemBody, InboxItemContent, InboxItemContext, InboxItemHeading, InboxItemMessage, InboxItemMetadata, InboxItemSelection, InboxItemSender, InboxItemSubtitle, InboxItemTimestamp, InboxItemTitle, InboxItemTrailing, InboxItemTrigger
| Prop | Type | Default |
|---|---|---|
| Allows 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.
Related
Changes
- 0.5.0 · AddedGraduated the composable
ActivityInboxshell, sidebar, selection toolbar, and standaloneInboxItemparts to the stable package entry point.