Component libraryNotification preferences
Notification preferences
ProA controlled notification preference form with grouped channel switches, local feedback and native submission semantics.
npx shadcn@latest add @tidal-pro/notification-preferencesInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/notification-preferences.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
title, channels, groups and onPreferenceChange are required. Channels and grouped preferences are consumer-owned; every preference supplies controlled channel controls with checked state, native checkbox attributes and refs. Native disabled or aria-disabled true resolves a disabled switch; explicit aria-disabled false is preserved. Optional description, eyebrow, heading level, labels, error, status, footer and empty content are consumer-owned ReactNode values. The native form preserves action, method, attributes and ref. Optional onSave composes with native submit behavior, so a consumer may prevent submission or allow the form action. Save and reset actions preserve native button attributes, submitter overrides, refs, caller prevention, explicit aria-disabled false and 44px targets. Busy leaves Save focusable with aria-disabled and suppresses submission. The component makes no request, stores no preference, sends no notification and claims no delivery outcome.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.