Pro
Notification bell
The bell that opens notifications: the unread count sits on it and rolls to its new value, the bell swings once when the count rises, and its name always says how many are unread.
pnpm dlx shadcn@latest add @caliper/notification-bellWhen to use
Use it for
- The notifications entry in an app header.
- Anywhere a count of unread items opens a list.
Skip it when
- Counts that change every second; show a live indicator instead.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Swing once when the count rises, never when it falls
- A new arrival is worth a glance; reading notifications is not. One swing, then stillness, so the header never keeps moving.
- The name carries the count
- The visible badge is hidden from assistive technology and the button is named “Notifications, 3 unread”, so the number is never read twice or missed.
Styling
- Ink badge, not red
- Unread is not an error. The badge uses the text colour with a ring of page colour so it reads on any header.
Usage
- Use it as the trigger
- It takes a ref and spreads props, so it can be the child of a popover or menu trigger directly.
Installation
pnpm dlx shadcn@latest add @caliper/notification-bell
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { NotificationBell } from "@/components/ui/notification-bell"
The worked example comes with Pro
The 60-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
NotificationBell
component
Also accepts the native props of its root element and a ref.
Accessibility
It is built on native elements and keeps aria-label and aria-hidden in step with state.
No custom key handling; Tab and the native activation keys do the work.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- BadgeA small label for status, category or count.
- Live indicatorWhether a feed is live, in words and a dot. The dot sends out a soft ring only while live, blinks while reconnecting and rests otherwise, and gives one extra ring for each update you tell it about.
- PopoverA small panel anchored to a trigger for quick settings or details.