Notifications page
Every alert the account has sent, under date rules and a tab for what is unread, with a panel of switches that turn each kind down.
What it is for
The notifications screen of an app: the whole alert history read newest first, split by day, with the unread ones lit; and, beside it, the six kinds the account can turn down.
Everything you set here is what the Code and Prompt tabs give you.
Datasheet
- Mechanism
- Alerts by day, Tabbed list with counts, Mark all as read, Unread lamp fade, Row settle, Settings rows with switches, Sync legend, List order segmented, Paginated list, Loading skeleton rows, Empty unread tab, Error retry, Toast confirmation, Phone single column, Finish following, Quiet volume
- Stack
- Vanilla ES modules, CSS
- Needs
- Nothing, no dependencies
- States
- 12 documented
- Version
- 0.1.0
- Licence
- With a Pass
States
- At restThe page head with the title, the lead and the Mark all as read key; the tabs All 24, Unread 3 and Mentions 1; the Order control at Newest. The Alerts panel has six alerts in four day groups, each under a ruled date heading; three unread rows carry a lit blue lamp. The settings panel has six rows, five switches on and Product news off, a Saved legend and the note.
- UnreadThe Unread tab shows the three unread alerts in two day groups and its count reads 3; Mentions shows the one mention and its count reads 1. The tablist is one tab stop; Left and Right move and select, Home and End go to the ends.
- LoadingSix skeleton rows stand where the list will print; every tab count reads a dash; the panel status says Loading alerts with an amber blinking lamp; Mark all as read is disabled.
- EmptyThe Unread tab is chosen and shows the Empty state You are up to date, with the settings panel still visible and every row's lamp out.
- ErrorNotifications could not load, in the kit's Error state tray with its printed outline, a red lamp and the words The list did not reach us. Nothing was changed. Retry is the one key: it holds, its lamp turns amber, and the six alerts come back after a moment.
- SuccessMark all as read empties the Unread tab, puts every unread lamp out, sets the Unread count to 0, moves the focus to the chosen tab and shows the Toast All caught up.
- A switch turnedPressing a settings row's words or its switch turns the switch at once. The Sync status says Saving… with an amber blinking lamp, then Saved with a green lamp and just now beside it. np-switch fires with { label, on }.
- OrderThe Segmented control switches the list from Newest to Oldest; the day groups and the rows inside them reverse, and the chosen segment is pressed in.
- PhoneUnder 700px the page is one column: the tabs scroll inside themselves under the title, the rows are 72px with the alert on two lines and the time at the right, the sender's coin and the kind tag make way, and the settings panel sits under the list behind its What you get heading. The Mark all as read key fills the width.
- KeyboardThe tablist is one stop with arrows, Home and End. Every row is one stop and Enter opens the invoice or client it names. Space turns a switch, and the whole settings row is its label. After Mark all as read the focus moves to the chosen tab, since the key is disabled.
- Reduced motionThe unread lamp goes out and a row appears with no fade and no settle; nothing blinks, and the Sync status stays lit amber while it saves.
- Finishes and volumeEvery surface and lamp reads the kit's tokens, so all fourteen finishes follow. The screen is set in the Quiet volume; its parts keep their sizes and draw hairlines and a whisper of depth.
Notes
Mark all as read is the one act, the tab empties, and the toast says all caught up. The list loads, fails and comes back in place, and the settings apply at once with a legend that says they are kept.
Original composition. Ledgerly, its alerts, clients, invoice numbers, times and switches are sample copy for an invented invoicing app, and the preview says so. The screen is made only of the Tactile UI Kit's parts, with the kit's tokens for every surface and lamp; the block writes no colour and changes no part's finish. It needs the kit's kit.css and kit.mjs beside it. The sample carries the newest six of the 24 the All tab counts, so the Pagination counts the six in this sample; the tab copy is the account's own. The 120ms lamp fade and the 90ms row settle are the two motions the recipe names, both skipped under reduced motion. The tabs are wired in the block because the kit wires a tablist once, when it loads, and this screen draws its own markup.
Anatomy
Alerts by day, Tabbed list with counts, Mark all as read, Unread lamp fade, Row settle, Settings rows with switches, Sync legend, List order segmented, Paginated list, Loading skeleton rows, Empty unread tab, Error retry, Toast confirmation, Phone single column, Finish following, Quiet volume
Usage notes
The notifications screen of an app: the whole alert history read newest first, split by day, with the unread ones lit; and, beside it, the six kinds the account can turn down. Mark all as read is the one act, the tab empties, and the toast says all caught up. The list loads, fails and comes back in place, and the settings apply at once with a legend that says they are kept.
Options
| Option | Type | Description |
|---|---|---|
| title | text | Page title |
| lead | text | Lead |
| state | enum | The screen at rest, six skeleton rows, the unread tab emptied, the list failed with Retry, or the toast after Mark all as read. |
| finish | enum | Auto takes the page’s own finish tokens if it has them, then its data-finish, then the visitor’s system. |
Methods
- alerts
- switches
- update
- destroy
How it works
Original composition. Ledgerly, its alerts, clients, invoice numbers, times and switches are sample copy for an invented invoicing app, and the preview says so. The screen is made only of the Tactile UI Kit's parts, with the kit's tokens for every surface and lamp; the block writes no colour and changes no part's finish. It needs the kit's kit.css and kit.mjs beside it. The tabs are wired in the block because the kit wires a tablist once, when it loads, and this screen draws its own markup.