# Notification Settings

> The notification preferences panel: event sections down the side, in-app, email, mobile and Slack across the top, a checkbox per cell. Column headers toggle a channel (mixed when partly on), required cells lock with a reason, unavailable ones show a dash. Email cadence, quiet hours and a Pause all menu sit alongside, and changes autosave with Saving… / Saved.

- Slug: `notification-settings`
- Category: [Notifications](https://www.assembli.design/category/notifications.md)
- Type: component
- Tags: notifications, preferences, settings, matrix, email, quiet-hours, autosave
- npm dependencies: @base-ui/react, lucide-react
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/notification-settings
- Page: https://www.assembli.design/components/notification-settings

![Notification Settings preview](https://www.assembli.design/thumbnails/notification-settings-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `channels` | `NotificationChannel[]` | `DEFAULT_CHANNELS` |  |
| `sections` | `NotificationSection[]` | `DEFAULT_SECTIONS` |  |
| `value` | `NotificationSettingsValue` |  |  |
| `defaultValue` | `NotificationSettingsValue` | `DEFAULT_NOTIFICATION_SETTINGS` |  |
| `onValueChange` | `(value: NotificationSettingsValue) => void` |  |  |
| `onSave` | `(value: NotificationSettingsValue) => Promise<void> \| void` |  | Persist a change. While it runs the header says "Saving…", then "Saved". |
| `saveDelay` | `number` | `600` | Delay before `onSave` runs after the last change, in ms. |
| `title` | `React.ReactNode` | `"Notifications"` |  |
| `description` | `React.ReactNode` | `"Choose what reaches you, and where."` |  |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/notification-settings/notification-settings.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/notification-settings
```

Registry item JSON: https://www.assembli.design/r/notification-settings.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
