# Notification Bell

> A bell that swings when something new arrives, with a popping unread badge and a panel of notifications you can swipe away.

Category: Feedback · MotionKit Plus · Updated 2026-11-12 · Live demo: https://www.motionkitui.com/components/notification-bell

## When to use it

App headers and dashboards, admin panels, SaaS products, community and messaging apps.

## How it works

The component remembers which notification ids it has seen; when a new one appears in the list, the bell plays a damped swing from its top and the badge pops in with a spring keyed to the unread count. The panel is a popover that closes on Escape or an outside click and hands focus back to the bell. Each row is draggable on the x axis and dismissed past a distance or flick speed, with a close button as the accessible alternative.

## Installation

Part of MotionKit Plus (https://www.motionkitui.com/pricing). Subscribers install it with `npx shadcn@latest add @motionkit/notification-bell` after adding their registry token from https://www.motionkitui.com/account.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `notifications` | `{ id; title; body?; time? }[]` | `three samples` | Newest first. Add one and the bell rings and announces it. |
| `onDismiss` | `(id: string) => void` |  | Called when a notification is swiped away or closed. |
| `accent` | `string` | `"#E7C2B4"` | Colour of the unread badge and dots. |
| `align` | `"left" \| "right"` | `"right"` | Which edge of the bell the panel lines up with. |

## Accessibility

- **Keyboard: Pass.** A real button opens the panel; Escape or a click outside closes it and returns focus to the bell. Every notification has a close button, so swiping is never required.
- **Screen readers: Pass.** The bell is labelled with the unread count and says whether the panel is open; new notifications and dismissals are announced in a polite live region.
- **Reduced motion: Pass.** With reduced motion on, the bell doesn't swing, the badge and panel fade, and swiping is turned off in favour of the close buttons.
- **Colour contrast: Pass.** Badge numbers measure 11.6:1 on the default colour, titles 15.5:1 and details 7.1:1 on the panel.
