Pendulum bell (Pro)
ProIncluded in $99A notification bell that swings and rings when something lands.
On this page
ProEach new notification swings the bell; the clapper lags and knocks, a ring flashes, and the badge counts up, then folds away when read.
The shell hangs from a pivot as a pendulum, and the clapper is a second, lazier pendulum on the same pivot that lags behind and knocks against the inner wall; a knock hard enough draws two short ring strokes. A new notification swings it, a click nudges it the other way, and the badge springs in and counts, then shrinks to a dot and drops away when it reaches zero. For when an agent finishes or needs you.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { PendulumBell } from "@/components/ui/chatcn/pro/pendulum-bell"
<PendulumBell count={unread} open={open} onClick={() => setOpen((o) => !o)} />Props
| Prop | Type | Notes |
|---|---|---|
count | number | Each rise swings the bell |
open | boolean | Sets aria-expanded and the pressed look |
label | string | Default Notifications |
Accessibility
- A button named with the unread count, with
aria-expandedfor its panel.
Motion
- Two coupled pendulums in 4 sub steps a frame; the ring fades in about 200 ms. Reduced motion: the bell holds still and the badge just counts.