Calm motion: animations on this site only fade, with no movement
Notification preferences
A grid of events by channel, with a check box in each cell
Lets a person choose which events reach them, and by which channel, such as email or push. A box at the top of each column turns that channel on or off for all events. For a list of notices that came in, use the notification inbox.
Basic
| Event | Push | SMS | |
|---|---|---|---|
| New episodeA show you follow posts an episode | |||
| Reply to youSomeone answers your comment | |||
| MentionSomeone names you in a comment | |||
| Weekly digestThe best episodes of the week |
eventsis a list of rows, each with akey, alabel, and an optionaldescription.channelsis a list of columns, each with akeyand alabel.v-modelholds the channels that are on for each event, such as{ reply: ["push"] }.- If every event uses a channel, the box at the top of its column is on. If no event uses it, the box is off. Between the two, the box shows a dash.
- The grid is a table of native check boxes, so the keyboard and screen readers know it. Each box has a name, such as "Reply to you by Push".
- Change the words with
labelsor a label pack:title,event, and the functionsallandcell.
Usage
ts
import { BlessNotificationPrefs } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
events* | BlessNotifyEvent[] | — | |
channels* | BlessNotifyChannel[] | — | |
label | string | — | names the table |
labels | Partial<{ title: string; event: string; all: (channel: string) => string; cell: (event: string, channel: string) => string; }> | — | |
modelValue | CheckMatrix | {} | the channels that are on for each event, by key |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: CheckMatrix] |