Notifications inbox
Every notification on one page, grouped by day, and acted on in place.
What a screen is
A screen is a whole page exported from the kit, built only from kit components and tokens. Import it once, pass your data and callbacks, and render it as the page: it brings its own nav and <main>, and its loading and empty states are built in. A pattern is the copy-in version you own and change; a block is one area that sits inside your <main>.
When to use
- one inbox for everything that needs a person: agent approvals, failed runs, plans to review, mentions and failed payments
- the user should act on a notification in place (approve, reply, open the run) and keep their place in the list
- you want the whole page done, with loading, all caught up and filtered empty, and only need to pass data and callbacks
When not to use
- a bell with a short list in the app header — NotificationStack
- only the agents' approvals and questions inside a page — AgentInbox
- feedback right after an action — Toast
- one approval inline — ApprovalCard
Usage
Every notification on one page: approvals, failed runs, plans, mentions, failed payments and system notes, grouped by day. The header counts what's unread and what needs you, with Mark all read and a settings button. Filter by Needs you, Mentions, Agents or Billing, search, or show unread only. The open notification sits beside the list and you act on it in place: approve or deny, open the run, review the plan, open the customer or reply. Import it once and pass the notifications and your callbacks. Day groups, row menus, the toasts that say what changed, phones, loading, all caught up and filtered empty come with it.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
notifications | array | — | { id, kind: "approval" | "failed-run" | "plan" | "mention" | "payment" | "system", title, preview, day: "today" | "yesterday" | "earlier", time, read?, needsYou?, billing?, agent?: { id, name, icon? }, actor?: { id, name, src?, tone? }, body?, approval?: { title, description?, risk?, action, facts?, status? }, run?: { runId, step?, error }, plan?: { planId, summary, steps, risk? }, payment?: { customerId, customer, invoice, amount, reason }, thread?: { id, author, body, when, parentId? }[] }[] Newest first. day picks the group; time is shown as given. kind picks the icon, the kind Badge and the detail. needsYou counts in Needs you (an approval stops needing you once you decide); billing counts in Billing; agent counts in Agents and adds Mute <agent> to the menu; actor is who mentioned you and puts their Avatar on the row. approval renders a kit ApprovalCard; thread renders a kit CommentThread with a reply box. amount is in US dollars. The screen keeps this visit's reads, archives, snoozes, mutes, decisions and replies on a working copy. Sample Northwind inbox (18 notifications, 12 unread, 3 need you) when omitted. |
selectedId | string | — | The open notification. Left out, the screen keeps it, with none open first. null closes it. |
onSelect | function | — | (id | null) => void. A row, Open the newest, or null from Back. Opening an unread notification also calls onAction("mark-read", id). |
filter | enum | — | The filter. Left out, the screen keeps it, starting on All. |
onFilterChange | function | — | (filter) => void. The SegmentedControl, or Clear filters. |
onAction | function | — | (action, id?, value?) => void. action is "mark-all-read" from the header (no id); "mark-read" | "mark-unread" | "snooze" | "mute-agent" | "archive" from a row menu or the detail menu, with the notification id; "approve" | "deny" from the ApprovalCard; "reply" from a mention's thread, with the reply text as value. Archive and Snooze take the row out of the list; each action says what changed in a kit Toast. |
onNavigate | function | — | (destination, detail?) => void. destination is an app nav row ("overview" | "inbox" | "agents" | "runs" | "customers" | "settings"), "settings" with { section: "notifications" } from the header IconButton and All caught up, or from a detail "run" ({ runId, agentId }: Run / Handoffs), "plan" ({ planId, agentId }: Plan review), "customer" ({ customerId }: Customer detail) and "agent" ({ agentId }). |
workspace | object | — | { name: string, icon?: KitIcon } App nav brand. Same shape as SettingsPreferencesScreen. Example workspace when omitted. |
user | object | — | { name: string, email?: string, src?: string } Account menu at the foot of the app nav (kit DropdownMenu: the avatar on the rail, the account card in the Drawer, both with src as the photo and an online presence mark; the menu holds View profile, Account settings, Documentation, Switch account with a sample second account, Add account and Sign out, all samples that only close the menu except Account settings, which goes to a Settings row when the screen has one). Same shape as SettingsPreferencesScreen. Example person when omitted. |
loading | boolean | false | The title stays (no count line, filters and Mark all read disabled); the list and the detail are Skeletons; main is aria-busy. |
empty | boolean | false | All caught up: kit Empty with Notification settings, whatever notifications holds. Also shown when notifications is empty. |
className | string | — | On the root layout-shell. |
States
- page: default, loading, empty, detail-open, needs-attention, filtered-empty
- notification: approval (Badge Approval, warning tone, ShieldQuestion; the detail is a kit ApprovalCard), failed run (Badge Failed run, danger tone, CircleX; the detail has a danger Alert and Open run), plan (Badge Plan, info tone, ListChecks; the detail has the steps and Review plan), mention (Badge Mention, primary tone, the person's Avatar; the detail is a kit CommentThread with a reply box), payment failed (Badge Payment failed, danger tone, CreditCard; the detail has a danger Alert and Open <customer>), system (Badge System, neutral tone, Info or the agent's icon; the detail has Open <agent> when an agent sent it), unread (Unread in words on the row), needs you (Needs you in words on the row, warning tone, and a Needs you Badge in the detail)
- layout: the list beside the open notification (--grid-breakpoint-md and wider, layout-split--secondary); with none open, kit Empty with Open the newest, the list on its own, rows that drill, and the open notification as the page under a Back bar (below --grid-breakpoint-md)
Accessibility
- Renders its own main landmark named Inbox; the app SideNav is an aside named App. Don't wrap the screen in another main
- PageHeader title is the page h1; the open notification's title is an h2 beside the list and the h1 when it is the page below --grid-breakpoint-md
- The filters sit in a search landmark named Filter notifications; the SegmentedControl is a radiogroup named Show and each option says its count
- The list is one kit ListView (a listbox at --grid-breakpoint-md and wider) named for the filter, with a group per day; Up and Down move between rows, Home and End jump
- Unread and Needs you are words in each row's name, not a dot or a colour; the kind Badge says the kind in words beside an icon; never colour alone
- Row menus are named Actions for the notification title; the detail menu is named More actions for the notification title and holds the same actions, so they work by keyboard
- The menus close on Escape and return focus to the control that opened them
- Mark read, Mark unread, Mark all read, Archive, Snooze, Mute, Approve, Deny and Reply sent are said in a kit Toast (role=status, polite)
- Archive and Snooze open the next notification when the archived one was open; from a row menu focus moves to the next row, or to the list when it was the last
- Below --grid-breakpoint-md opening a row moves focus to the notification's title, and Back (a nav named Back) returns focus to that row
- Below --grid-breakpoint-md the nav opens from an IconButton named Menu into a kit Drawer
- loading sets aria-busy on main
- No motion of its own
Responsive
- Wide (--grid-breakpoint-md and wider): SideNav on the canvas, the page on the inset panel, the list beside the open notification (layout-split--secondary); the open notification stays in view while the list scrolls
- Below --grid-breakpoint-md: the nav moves into a left kit Drawer, the list fills the page, rows drill, and the open notification is the page under a Back bar
- Below --grid-breakpoint-sm: the search goes on its own row; the SegmentedControl scrolls sideways when the counts don't fit
- Dark mode follows the root theme; semantic tokens only
Do not
- Do not copy the screen's parts into a local cousin; change it through its props or compose the kit pieces yourself
- Do not wrap it in an app shell or another main
- Do not add a second solid primary Button; the open notification's one action (Approve, Open run, Review plan or Open the customer) is the only one
- Do not show unread, needs you or a kind by colour alone
- Do not use raw hex
Built from
Related
- Component
NotificationStack
The durable in-app inbox of product notifications: an sm bell with the unread count opens a 24rem kit Popover (a full-height Drawer below --grid-breakpoint-sm) with the list, Mark all read and View all.
- Component
AgentInbox
A queue of what agents need from you: approvals, questions, failed runs and finished recaps.
- Component
Toast
A short note that floats in after an action, like Saved successfully, and goes away on its own after a few seconds, with an optional Undo.
- Component
ApprovalCard
The agent asks before it acts: risk, what will happen in words, an exact preview of the command or diff, and Approve (⌘/Ctrl+Enter) / Deny (Escape) with an optional auto-deny countdown.