Notification
Notification Bell
NewA bell with a red unread dot that rings as it opens a panel of notifications, with a gliding highlight and mark all as read.
npx motionsnack add notification-bellCustomize
<NotificationBell />Props
17 properties
| Property | Type | Default | Description |
|---|---|---|---|
| items | { id?: string; title: string; body?: string; time?: string; unread?: boolean; href?: string }[] | 3 demo notifications | Notifications in the panel, newest first. |
| onSelect | (id: string) => void | - | Called with the id of the row the user opened; it is marked as read. |
| open | boolean | - | Open state (controlled). |
| defaultOpen | boolean | false | Open state at first render (uncontrolled). |
| onOpenChange | (open: boolean) => void | - | Called whenever the panel opens or closes. |
| loading | boolean | false | Skeleton rows (after 500ms) instead of the list. |
| error | string | '' | Any text shows an error row with Retry. |
| onRetry | () => void | - | Called by the Retry button of the error row. |
| labels | { viewAll?: string; unread?: string; error?: string; retry?: string } | English | Smaller UI strings. |
| onMarkAllRead | () => void | - | Called when the user marks everything as read. |
| className | string | '' | Extra classes on the wrapper. |
| indicator | 'dot' | 'count' | 'dot' | A dot on the bell, or the number of unread notifications. |
| heading | string | 'Notifications' | Title of the panel. Empty hides it. |
| viewAllHref | string | '' | Link of the footer row. Empty hides the footer. |
| markAllLabel | string | 'Mark all as read' | Empty hides the button. |
| emptyText | string | 'You're all caught up.' | Line shown when there are no notifications. |
| align | 'start' | 'end' | 'end' | Side of the bell the panel lines up with. |
About Notification Bell
Notification Bell is the bell an app keeps in its header. A small dot, or the number of unread notifications, sits on the button; clicking it gives the bell a short ring and springs open a panel in the same style as the library's dropdowns. Each notification has a title, an optional second line and a time, unread ones carry a dot in the indicator colour, and a soft highlight glides to whichever row is under the pointer. Opening a notification marks it as read and its dot fades out; Mark all as read clears them all and the dot on the bell pops away. The panel closes on a click outside or with Escape, and an empty list shows a short line instead.
What's included
- Unread dot or a counter capped at 99+
- Bell rings as the panel opens
- Panel styled like the library's dropdowns
- Highlight that glides between rows
- Mark one or all as read, dots fade out
- Closes on outside click and Escape
- Light and dark look, respects reduced motion
- Type
- Animated React notification component
- Library
- Components · Notification
- Stack
- Next.js, React, Tailwind CSS, Framer Motion
- Added
- 2026-11-24
- Install
npx motionsnack add notification-bell