Settings
BlockA settings page with a profile form, immediate toggles and a danger zone.
- SaaS
- 10 components
- 1 file
Loading the example…
pnpm dlx @dowel-ui/cli add settingsimport { SettingsBlock } from "@/components/blocks/settings";<SettingsBlock>
| Prop | Type | Default |
|---|---|---|
notifications (required) | SettingsNotification[] | — |
profile (required) | SettingsProfile | — |
extraTabsExtra tabs, if the product needs them. | { value: string; label: string; content: ReactNode }[] | [] |
onDeleteAccount | () => void | — |
onSaveProfileStaged: the profile form has a Save button. | (profile: SettingsProfile) => void | — |
onToggleNotificationImmediate: a switch applies as soon as it is flipped. | (id: string, enabled: boolean) => void | — |
pending | boolean | false |
className | string | — |
Switches apply immediately and have no Save button — a switch that needs saving is a broken promise, so staged changes live in the form instead. The delete confirmation names what will be destroyed and requires typing the account's email, so the destructive button cannot be reached by muscle memory.