NotificationBell

The bell that tells you something arrived: a new notification swings it from the top and sends a ring out, and the count pops in then rolls. Buttons.

Open playground

About

NotificationBell is a React component in the Buttons category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { NotificationBell } from "@ashutoshswamy/smoui" and set count, onClick, label among its 4 props.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { NotificationBell } from "@ashutoshswamy/smoui";

<NotificationBell count={4} onClick={() => openNotifications()} />

Props 4

count

Unread items. Counts above 99 show 99+.

numberdefault 0
onClick

Opens your notification UI.

() => void
label

Accessible button label.

stringdefault "Notifications"
className

Class on the button.

string