shadcn.io is not affiliated with official shadcn/ui
No Notifications Empty State Block for React
An activity inbox's bell popover shown open in place: You're all caught up, a cup of tea whose three wisps of steam turn solid as Mentions, Replies and Updates are switched on, and a Save preferences button that says Saved in this demo.
Installation
Overview
Turn "nothing new" into a small act of care, with this no notifications empty state for React with Base UI. The host is Tinglebox, an activity inbox: its header holds the real bell button, named "Notifications, 0 unread", and under it a stage draws the page, a top bar with a twin of that bell, a row of tiles and a few rows. Drawn open in place under the bell is the Popover card: "You're all caught up", a cup on a saucer with three wisps of steam that are dashed while their preference is off and solid once it is on, three Switches (Mentions, Replies, Updates) and the Shine Button, the only colored control, Save preferences. The card counts what is not saved yet; saving says so and stores nothing. Pressing the bell opens the real non-modal popover with the same content. The frame is ruled by Guides, and everything moves with CSS only. For the bell of any inbox, feed or notification center.
FAQ
What stays in the page, and how do I make it real?
The three switches and the saved set live in the page's state: a reload brings back the defaults (Mentions and Replies on), and Start over does the same without one. Save preferences says "Saved in this demo" and nothing is stored or sent. To wire it for real, post the list of switched-on ids to your API where the code says so and start the state from what you load.
What is the in-place card, and what is the real popover?
Shown open in place for the preview, so the block shows its content without a click: on load the card is drawn as a plain non-modal element under the bell on the stage. Pressing the bell opens the real Popover, with Escape to close it and focus back on the bell, and the in-place copy stays closed until a reload. Both show the same content and the same state, so a switch moved in place is moved in the real one. In your app keep only the Popover and its trigger.
What do the wisps of steam do?
Each wisp stands for one preference, in order: Mentions, Replies, Updates. A wisp is dashed while its switch is off and turns solid when it is on, so the cup shows at a glance how much of the inbox you will hear about. The drawing is hidden from assistive technology; the same fact is in the card's line ("2 of 3 on.") and in the switches themselves.
What does the card's line say, and what does Save do?
One line under the switches follows a priority: how many changes are not saved yet ("1 change not saved yet."), then the last result ("Saved in this demo."), then the count that are on. Save preferences stays in the tab order and says "No changes to save." when nothing changed. A polite status line outside the card says the same things, so they are heard whether the card is drawn in place or real.
Is it usable with a keyboard and a screen reader?
The bell is a real button whose name includes how many are unread. In the card Tab reaches the three switches, each named for its preference, then Save preferences; Escape closes the real popover and returns focus to the bell.
How does it look on a phone?
The in-place card docks to the foot of the stage so the Save button is on the first screen, and scrolls inside itself if the screen is short. The real popover keeps the catalog's own phone layout, a card under the bell that never runs past the screen's edge, and nothing scrolls sideways, even at 320 px wide.
Related
- Pro
No Mentions Empty State
Inbox and chatA work chat's mentions popover shown open in place: a drawn list with a dashed row, a Try it field where typing @ opens five teammates, and a Post button that adds a row naming who was tagged.
- 5Pro
Bell Dropdown Notification
Bells and panelsThe list under a CRM's notification bell, shown open under its top bar: five notifications that mark themselves read when pressed, a bell whose count and name go down with them, Mark all read and See all.
- Pro
Notification Preferences Settings
NotificationsA notification settings panel: a channel strip with all-or-nothing checkboxes, a matrix of switches by activity and channel with a locked security email, quiet hours, and a save bar that counts unsaved changes.
- Pro
No Alerts Empty State
MonitoringAn ops status board's quiet alerts page: a bell under a glass dome, four systems that each say Operational with a drawn 30-day strip, and a Send a test alert button that fills a dashed slot with a typed row you can dismiss.
- Pro
No Messages Empty State
Inbox and chatA mail app's empty inbox: tabs with their counts, a drawn letter tray with a dashed envelope, and a Compose button, or the C key, that opens a dialog whose Send fills the Sent tab.
- Pro
No Activity Log Empty State
Activity and updatesA personal activity feed with nothing recorded yet: four tick cards for the kinds of event beside a vertical timeline of dashed nodes that turn solid and write a first-person sample line as each kind is ticked.