TidalUI

Notification preferences preview

A controlled notification preference form with grouped channel switches, local feedback and native submission semantics.

pro · Forms · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/notification-preferences

Import components/ui/tidal.css, components/ui/notification-preferences.css. Wrap installed components in tidal-scope.

Preview

Notification preferences component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/notification-preferences.css";
import{TidalNotificationPreferences}from"./components/ui/notification-preferences";
export default(p:Parameters<typeof TidalNotificationPreferences>[0])=><div className="tidal-scope"><TidalNotificationPreferences {...p}/></div>;

API and props

TidalNotificationPreferences.channels (required)
ReadonlyArray<TidalNotificationChannel>

Required channels value accepted by this exported component.

TidalNotificationPreferences.groups (required)
ReadonlyArray<TidalNotificationPreferenceGroup>

Required groups value accepted by this exported component.

TidalNotificationPreferences.onPreferenceChange (required)
(preference: TidalNotificationPreference, channel: TidalNotificationChannel, checked: boolean, event: ChangeEvent<HTMLInputElement>) => void

Callback invoked when the preference change interaction is proposed.

TidalNotificationPreferences.title (required)
ReactNode

Required title value accepted by this exported component.

TidalNotificationPreferences.busy
boolean | undefined

Optional busy value accepted by this exported component.

TidalNotificationPreferences.description
ReactNode

Optional description value accepted by this exported component.

TidalNotificationPreferences.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalNotificationPreferences.error
ReactNode

Optional error value accepted by this exported component.

TidalNotificationPreferences.eyebrow
ReactNode

Optional eyebrow value accepted by this exported component.

TidalNotificationPreferences.footer
ReactNode

Optional footer value accepted by this exported component.

TidalNotificationPreferences.headingLevel
"h2" | "h3" | "h4" | undefined

Optional heading level value accepted by this exported component.

TidalNotificationPreferences.labels
Partial<TidalNotificationPreferenceLabels> | undefined

Optional labels value accepted by this exported component.

TidalNotificationPreferences.onSave
((event: FormEvent<HTMLFormElement>) => void) | undefined

Callback invoked when the save interaction is proposed.

TidalNotificationPreferences.resetAction
TidalNotificationResetAction | undefined

Optional reset action value accepted by this exported component.

TidalNotificationPreferences.saveButtonProps
Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> | undefined

Optional save button props value accepted by this exported component.

TidalNotificationPreferences.saveButtonRef
Ref<HTMLButtonElement> | undefined

Optional save button ref value accepted by this exported component.

TidalNotificationPreferences.status
ReactNode

Optional status value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas