App, notification inbox


Install
npx shadcn add @klarhimmel/app-notifications-inboxDetailsAbout, usage, props and more
An inbox of notifications grouped by day: unread items marked with a dot and the word, an unread count in a live region, All and Unread filters, and Mark all as read.
Import
Import
- app/notifications-inbox
- About
- An inbox of notifications grouped by day: unread items marked with a dot and the word, an unread count in a live region, All and Unread filters, and Mark all as read. Opening an item marks it read in place. Filled and empty states.
- Category
- Interface sections for signed-in products. New project? Set it up once: /get-started/installation.
Notes
When to use it
A page of notifications grouped by day, with unread marking and a filter. For one short list of alerts inside a settings area, app-settings-notifications is the block that controls what gets sent; this one shows what already arrived.
Writing for it
- Group labels hold 30 characters and read best as days: Today, Yesterday. The groups run newest first, and you get at most 3 groups of 5 items. - An item title holds 80 characters and the body 160. Put the event in the title and the detail in the body, and give href a real destination because opening the link marks the item read. - unreadWord (20) is read aloud beside unread items, so use a word that makes sense on its own, such as Unread, not a symbol.
Watch out for
A day group with no visible items is hidden, and with the Unread filter on and everything read, a message from messages.allRead takes its place. Leave allRead empty and that moment is silent.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Inbox' | Text, up to 60 characters. Optional; empty is not rendered. |
title | string | 'Notifications' | Text, up to 120 characters. |
description | string | 'Say what happened while the person …' | Text, up to 300 characters. Optional; empty is not rendered. |
filterLabel | string | 'Show' | Text, up to 40 characters. |
filters | { all, unread } | {…} | Fields: all, unread. |
unreadSuffix | string | 'unread' | Text, up to 20 characters. |
unreadWord | string | 'Unread' | Text, up to 20 characters. |
markAll | string | 'Mark all as read' | Text, up to 30 characters. |
groups | { label, items }[] | 2 items | List of 1 to 3. Each item: label, items. |
state | 'filled' | 'empty' | 'filled' | One of 'filled', 'empty'. |
messages | { emptyTitle, emptyBody, allRead } | {…} | Fields: emptyTitle, emptyBody, allRead. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |