InboxPanel
Display a notification inbox with read, dismissal, and empty states.
InboxPanel lists notifications with read and dismissal actions. The application supplies the notification records and handles changes.
Import
import { InboxPanel } from "@solarius/onset";Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | NotificationItem[] | — | Notification data array. |
title | ReactNode | "Notifications" | Panel title. |
onRead | (id: string) => void | — | Mark one as read. |
onDismiss | (id: string) => void | — | Dismiss one. |
onReadAll | () => void | — | Displays a Mark all as read button while unread items exist. |
onItemClick | (item: NotificationItem) => void | — | Click handler for a row. |
filterable | boolean | true | Adds All / Unread filter row under the header. Ignored when views is set. |
views | InboxView[] | — | Replaces All and Unread views. The application filters the supplied items. |
activeView | string | — | Controlled selected view key. |
defaultActiveView | string | — | Initial selected key for an uncontrolled custom view row. |
onViewChange | (key: string) => void | — | A view was picked. |
searchable | boolean | — | Adds a search band between the header and the views. |
searchValue | string | — | Controlled search text. |
onSearchChange | (value: string) => void | — | Delegates search filtering to the application. When omitted, the field filters items locally. |
searchPlaceholder | string | "Search notifications" | Placeholder for the search field. |
unreadCount | number | — | Header badge total. Defaults to the unread rows in items, which undercounts a paginated list. |
headerActions | ReactNode | — | Right-aligned header content. Pointer presses in this area do not start dragging. |
footer | ReactNode | — | Footer content below the scrolling list. |
loading | boolean | — | Swaps the list for placeholder rows while the first page loads. |
grouped | boolean | — | Section rows under their category. |
emptyMessage | ReactNode | "You're all caught up." | Message when the list is empty. |
maxHeight | number | 380 | List max height in px. |
width | number | string | 320px | Panel width. |