#088
Notification panel
A right drawer, 400px wide, listing four notifications with unread dots and timestamps.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Notification panel" pattern (@codeatlasdev/ui demo #088, feedback/drawer) in my app.
Call get_demo({ ids: ["#088"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: A notifications panel opened from a header bell button.
Keep these library parts, with the props and tokens the demo uses:
- Drawer, Button, Stack from "@codeatlasdev/ui"
Behaviour to keep:
- `<Drawer bind:open title="Notifications" side="right" width="400px">`
- `const items` has four entries with fields `title`, `body`, `time` and `unread`, two unread
- Rows rendered with `{#each items as n}` and `class:notif--unread={n.unread}`; unread rows show `<span class="dot">`
- `{#snippet actions()}` holds `<Button variant="ghost" size="sm"` labelled Mark all read
- Trigger is `<Button variant="ghost"` with a `<Bell size={14} />` icon
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
How it is built
- `<Drawer bind:open title="Notifications" side="right" width="400px">`
- `const items` has four entries with fields `title`, `body`, `time` and `unread`, two unread
- Rows rendered with `{#each items as n}` and `class:notif--unread={n.unread}`; unread rows show `<span class="dot">`
- `{#snippet actions()}` holds `<Button variant="ghost" size="sm"` labelled Mark all read
- Trigger is `<Button variant="ghost"` with a `<Bell size={14} />` icon
Related
Loading source.