# Notification Bell

> A notification bell that swings when something new arrives, rolls its badge count up, and drops the badge into the bell once read.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › State Changes |
| Live preview | https://uibrik.com/components/notification-bell |
| Writes | 1 file into `components/uibrik/notification-bell/` |
| Packages | `@number-flow/react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 22, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/notification-bell.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/notification-bell`.

Can't run commands? https://uibrik.com/components/notification-bell/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { NotificationBell } from "@/components/uibrik/notification-bell/notification-bell";

<NotificationBell
  defaultCount={3}
  clearOnClick
  max={99}
  dot={false}
  color="#dc2626"
  variant="soft"
  size="md"
  onClick={() => {}}
  // count={0}
  // onCountChange={(count) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/notification-bell.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `defaultCount` | `number` | `3` | Unread count on mount when uncontrolled. |
| `clearOnClick` | `boolean` | `true` | Mark everything read when pressed. |
| `max` | `number` | `99` | Counts above this show as "max+". |
| `dot` | `boolean` | `false` | A dot instead of a number. |
| `color` | `string` | `"#dc2626"` | Badge colour. |
| `variant` | `"soft" \| "ghost"` | `"soft"` | Filled, or transparent until hovered. |
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | Button and icon size. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `count / onCountChange` | `number / (count) => void` |  | Controlled unread count. Raising it swings the bell. |
| `onClick` | `() => void` |  | Called on press, e.g. to open a panel. |
| `className` | `string` |  | Classes for the button. |

## Where it fits

- **App navbars**: The swing catches the eye only when something new arrives, so the bell can sit quietly the rest of the time. Pairs with [Notification Center](https://uibrik.com/components/notification-center.md) (Pro) and [Classic Navbar](https://uibrik.com/components/classic-navbar.md).
- **Dashboards**: Counts roll up digit by digit, so a jump from 9 to 10 reads as more, not as a different number. Pairs with [Project Dashboard](https://uibrik.com/components/project-dashboard.md) (Pro).
- **Inbox and mentions**: A dot mode suits places where the exact number matters less than knowing there is something. Pairs with [Event Feed](https://uibrik.com/components/event-feed.md).

## Same shelf: State Changes

- [Password Peek](https://uibrik.com/components/password-peek.md): A password field whose eye blinks as you toggle it, and whose characters rise into view left to right instead of snapping from dots.
- [Pin Tab](https://uibrik.com/components/pin-tab.md) (Pro): A tab bar where pinning shrinks a tab to its icon and slides it to the front, and unpinning grows it back with its title.
- [Presence Dot](https://uibrik.com/components/presence-dot.md) (Pro): An avatar status dot that morphs between online, away, busy and offline, and opens from the dot itself into a tiny picker that previews each status as you hover.
- [Read Receipts](https://uibrik.com/components/read-receipts.md): A message bubble whose clock turns into one tick, then two, then fills with colour once the message is read.
- [Sync Button](https://uibrik.com/components/sync-button.md): A sync button whose arrows spin while it works, coast to a stop instead of halting, draw a check, and keep "Synced 3 min ago" up to date.
- [Typing Dots](https://uibrik.com/components/typing-dots.md): A typing indicator whose bubble grows from three dots into the message itself, so the reply lands where the dots were.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/notification-bell/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
