Notification Bell
betaA round bell button with an unread badge: the bell swings when notifications land — harder when several land at once — and the count rolls.
- Feedback
- 1 file
- 3 npm packages
- Accessibility notes
- Animates with motion
pnpm dlx @dowel-ui/cli add notification-bellnpm packages installed: class-variance-authority, motion, radix-ui.
import { NotificationBell } from "@/components/ui/notification-bell";Default
Playground
Dot
Overflow
Sizes
Tones
On An Avatar
<NotificationBell>
| Prop | Type | Default |
|---|---|---|
appearance | "soft" | "ghost" | "outline" | "soft" |
countUnread total. Hidden at 0; fractional or negative values are floored to it. | number | 0 |
labelThe built-in bell's accessible name. Default: "Notifications, 3 unread". With | string | ((count: number) => string) | — |
liveAnnounce the settled count politely when it changes. Off by default. | boolean | false |
maxHighest number shown; above it the badge reads "99+". | number | 99 |
sizeDiameter in pixels. The bell, the badge and its digits are all fractions of it. | number | 40 |
toneBadge colour, from the semantic palette. | NotificationBadgeProps["tone"] | "destructive" |
variantThe badge's shape. A dot appears and leaves on the same counts as the number. | "count" | "dot" | "count" |
asChildPut the badge on your own element (an avatar, a nav item) instead of the bell. | boolean | false |
Plus every attribute of <button>.
10/10
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — passes
- No fixed widths — passes