Pro
Notification preferences
What people are told about and where: every event against email, in-app and push, one switch per group that shows when only some are on, a digest for the rest, and a pause with a visible end.
pnpm dlx shadcn@latest add @caliper/notification-preferencesWhen to use
Use it for
- The notifications page in account settings.
- Any product that sends more than a handful of kinds of message.
Skip it when
- A single on/off for one kind of email; use a switch in a settings row.
Installation
pnpm dlx shadcn@latest add @caliper/notification-preferences
Adds its 8 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 { NotificationPreferences } from "@/components/ui/notification-preferences"
The worked example comes with Pro
The 85-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
NotificationPreferences
component
Accessibility
It exposes status semantics, with aria-label, aria-hidden, aria-labelledby and aria-disabled kept in step with state. Changes that matter are announced through a live region.
Keyboard and focus handling comes from Radix popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.
Motion
Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.
Related
- Settings screenSettings that show what changed before you save: an ember mark and the previous value on each field, one bar that names the changes.
- Notification centerA list of notifications with read state and filters.
- CheckboxA native checkbox with a clear checked, unchecked and indeterminate state.