API and Development
NotificationItem accepts an entry, copy props, optional sourceGlyphs, and handlers (onGoTo, onToggleRead, onDismiss, onAction).
| Name | Type | Default | Description |
|---|---|---|---|
actionsMenuLabel | LocalizedMessage | — | Accessible name of the actions menu trigger, which stays reachable by keyboard and touch. |
copiedErrorCodeLabel | LocalizedMessage | — | Success announcement after copying the error code. |
copyErrorCodeErrorLabel | LocalizedMessage | — | Failure announcement when copying the error code fails. |
copyErrorCodeLabel | LocalizedMessage | — | Label for the error-code {@link CopyButton }. |
dismissLabel | LocalizedMessage | — | Name of the dismiss button and menu item. |
entry | NotificationItemEntry | — | Notification row to render. |
markReadLabel | LocalizedMessage | — | Name of the read toggle button and menu item while the entry is unread. |
markUnreadLabel | LocalizedMessage | — | Name of the read toggle button and menu item while the entry is read. |
onAction | (entry: NotificationItemEntry, action: NotificationItemAction) => void | — | Invoked for each custom or status action from the menu. |
onDismiss | (entry: NotificationItemEntry) => void | — | Dismisses the entry from the inbox. |
onGoTo | (entry: NotificationItemEntry) => void | — | Invoked when the person activates Go to. The item does not navigate. |
onToggleRead | (entry: NotificationItemEntry) => void | — | Toggles read state for the entry. |
unreadLabel | LocalizedMessage | — | Text that starts the row's accessible name while the entry is unread, so assistive technology announces the state. |
updatesLabel | NotificationItemUpdatesLabel | — | Disclosure control for multiple detections; receives the detection count (at least two). |
className | string | — | Classes on the outer list item. |
now | string | — | Reference instant (ISO 8601) for the "today" check that decides between a clock time and a short date. Defaults to the clock when the row mounts. The inbox passes one value to every row so they agree across midnight, and stories and tests pass a fixed one. |
sourceGlyphs | Readonly<Partial<Record<NotificationItemSourceKey, Glyph>>> | — | Optional map that adds or overrides default source glyphs. Unknown keys use the generic fallback glyph. |