Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

NotificationCenter

A controlled inbox with read and dismiss actions.

Preview

Live preview

Changes apply to this preview only.

Acme workspace

Notifications stay local to this demo; the component has no global store.

2 unread
Last actionNo notification action yet

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Read and dismiss

The application owns read state and dismissal; the count and list reflect those changes.

Open preview

Empty inbox

A calm empty message, with no invented notification count or action.

Open preview

Without tabs

Tabs are opt-in. The same panel works with a single list, a custom empty label and a placed action button.

Open preview

Usage

Keep notification state in the application; callbacks report intent rather than persisting data.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluNotificationAction

Type source
PimoluNotificationAction public API
NameTypeDefaultDescription
labelRequiredReactNode—Visible label associated with the control.
onClickRequired() => void—Public Pimolu prop; see the source declaration for details.
labelRequired

ReactNode

No default extracted.

Visible label associated with the control.

onClickRequired

() => void

No default extracted.

Public Pimolu prop; see the source declaration for details.

PimoluNotification

Type source
PimoluNotification public API
NameTypeDefaultDescription
idRequiredstring—Public Pimolu prop; see the source declaration for details.
titleRequiredReactNode"Notifications"Public Pimolu prop; see the source declaration for details.
descriptionReactNode—Public Pimolu prop; see the source declaration for details.
timeReactNode—Human-readable time, rendered as-is (for example "12 min ago").
readboolean | undefined—Unread when omitted.
iconReactNode—Optional leading glyph. It is decorative.
actionPimoluNotificationAction | undefined—Optional inline action, such as "View invoice".
idRequired

string

No default extracted.

Public Pimolu prop; see the source declaration for details.

titleRequired

ReactNode

Default: "Notifications"

Public Pimolu prop; see the source declaration for details.

description

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

time

ReactNode

No default extracted.

Human-readable time, rendered as-is (for example "12 min ago").

read

boolean | undefined

No default extracted.

Unread when omitted.

icon

ReactNode

No default extracted.

Optional leading glyph. It is decorative.

action

PimoluNotificationAction | undefined

No default extracted.

Optional inline action, such as "View invoice".

PimoluNotificationCenterProps

Type source
PimoluNotificationCenterProps public API
NameTypeDefaultDescription
notificationsRequiredPimoluNotification[]—Public Pimolu prop; see the source declaration for details.
onRead((id: string) => void) | undefined—Marks one notification as read.
onReadAll(() => void) | undefined—Marks every notification as read.
onDismiss((id: string) => void) | undefined—Removes one notification. Hides the dismiss button when omitted.
openboolean | undefined—Controlled open state. Omit to let the component own it.
defaultOpenboolean | undefinedfalseInitial open state when uncontrolled. Defaults to false.
onOpenChange((open: boolean) => void) | undefined—Called whenever the panel asks to open or close.
placementPimoluPopoverPlacement | undefined"bottom"Preferred side of the trigger. Defaults to "bottom".
showTabsboolean | undefinedfalseShow the All / Unread filter tabs. Defaults to false.
defaultTabPimoluNotificationTab | undefined"all"Initial tab when tabs are enabled. Defaults to "all".
triggerLabelstring | undefined"Notifications"Accessible name of the bell. Defaults to "Notifications".
titlestring | undefined"Notifications"Heading of the panel. Defaults to "Notifications".
readAllLabelstring | undefined"Mark all as read"Label of the mark-all action. Defaults to "Mark all as read".
tabsLabelstring | undefined"Notification filters"Accessible name of the tab list. Defaults to "Notification filters".
dismissLabelstring | undefined"Dismiss notification"Accessible name of a dismiss button. Defaults to "Dismiss notification".
emptyLabelReactNode—Replaces the default empty message.
emptyStateReactNode—Replaces the whole empty state.
classNamestring | undefined—Class applied to the popover panel.
notificationsRequired

PimoluNotification[]

No default extracted.

Public Pimolu prop; see the source declaration for details.

onRead

((id: string) => void) | undefined

No default extracted.

Marks one notification as read.

onReadAll

(() => void) | undefined

No default extracted.

Marks every notification as read.

onDismiss

((id: string) => void) | undefined

No default extracted.

Removes one notification. Hides the dismiss button when omitted.

open

boolean | undefined

No default extracted.

Controlled open state. Omit to let the component own it.

defaultOpen

boolean | undefined

Default: false

Initial open state when uncontrolled. Defaults to false.

onOpenChange

((open: boolean) => void) | undefined

No default extracted.

Called whenever the panel asks to open or close.

placement

PimoluPopoverPlacement | undefined

Default: "bottom"

Preferred side of the trigger. Defaults to "bottom".

showTabs

boolean | undefined

Default: false

Show the All / Unread filter tabs. Defaults to false.

defaultTab

PimoluNotificationTab | undefined

Default: "all"

Initial tab when tabs are enabled. Defaults to "all".

triggerLabel

string | undefined

Default: "Notifications"

Accessible name of the bell. Defaults to "Notifications".

title

string | undefined

Default: "Notifications"

Heading of the panel. Defaults to "Notifications".

readAllLabel

string | undefined

Default: "Mark all as read"

Label of the mark-all action. Defaults to "Mark all as read".

tabsLabel

string | undefined

Default: "Notification filters"

Accessible name of the tab list. Defaults to "Notification filters".

dismissLabel

string | undefined

Default: "Dismiss notification"

Accessible name of a dismiss button. Defaults to "Dismiss notification".

emptyLabel

ReactNode

No default extracted.

Replaces the default empty message.

emptyState

ReactNode

No default extracted.

Replaces the whole empty state.

className

string | undefined

No default extracted.

Class applied to the popover panel.

Accessibility

  • Name the bell and panel, verify tabs and item actions, and keep dismiss actions separate from reading.
Read the accessibility guide →