Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

No Messages Empty State Block for React

A 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.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Show an empty mailbox as the mail it is about to hold, with this no messages empty state for React with Base UI. A header and one framed panel for Letterfern, a mail app: the panel opens on three Tabs, Inbox 0, Sent 0 and Drafts 0, and under them the empty tab shows a drawn letter tray, two open trays with one dashed envelope standing in the upper one, and a sentence. The Shine Button, the only colored control, is Compose in the header, with a Kbd hint that C does the same while focus is inside the panel. It opens a Dialog with To, Subject and a message in Fields. Send closes it, puts the message in Sent, so the count becomes 1 and that tab opens, and turns the dashed envelope solid. The frame is ruled by Guides, and everything moves with CSS transitions only. For the empty inbox of any mail or messaging app.

FAQ

What stays in the page, and how do I make it real?

The sent messages stay in the page's state and each row says it was not delivered. Nothing goes to a mail service and a reload empties it; Start over empties Sent without one. To wire it for real, hand the recipient, the subject and the message to your mail API where the code says so, add the row from the response, and show a failure under the To field.

How does the C shortcut work?

Pressing C while focus is anywhere inside the panel, and not in a text field, opens the compose dialog; the key is never listened for on the rest of the page. On a phone the hint is hidden, since there is no keyboard to press. Escape or Cancel closes the dialog and focus goes back to the Compose button.

What does Send check?

That To holds an address like name@example.test, otherwise the field says what is missing and takes focus. The subject and the message are optional: an empty subject is listed as "(no subject)". The demo keeps three sent messages, newest first, and says so when a fourth is sent.

Why are Inbox and Drafts always empty?

Nothing arrives in a demo, and a message you cancel is discarded, so only Sent can fill. Each empty tab has its own sentence, and every tab keeps the same height whether it shows rows or the empty state.

Is it usable with a keyboard and a screen reader?

The tabs follow the tabs pattern with the arrow keys, and each tab's name includes its count. The dialog traps focus, names its fields and returns focus to Compose. A polite status line says what happened once the dialog has closed, such as "Sent to ines@example.test in this demo. Nothing was delivered." The drawing is hidden from assistive technology.

How does it look on a phone?

The header's buttons sit under the sentence and the key hint goes. The three tabs fit in one row and scroll inside their own band if a label is longer. The dialog fills the width and scrolls inside itself, and nothing scrolls sideways, even at 320 px wide.

  • Pro

    A support inbox with no conversations: two drawn speech bubbles, one dashed, a list with one dashed place, and a card where you pick a customer and write a first message that becomes a bubble in a thread.

  • Pro

    A discussion board's first thread: three starter cards with drawn thread sketches, a title and details, one Start thread button and a list of the threads you start.

  • Pro

    Invite Members Dialog

    Share and invite

    A household calendar's Members page with its invite dialog shown open: one email field that knows the household's domain, so an outside address joins as a guest, the people who already have access, and a Send invite button that adds a pending row.

  • Pro

    No Notifications Empty State

    Activity and updates

    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.

  • Pro

    A team chat before the team joins a channel: the browse dialog shown open in place over a drawn chat shell, with a hash sign, a search that filters five channels, a Join toggle on each and one Join button that counts them.

  • Pro

    An AI assistant's empty history in a framed window: the sidebar says No chats yet, a drawing of three stacked speech cards and four prompt chips lead to a log and composer with sample replies.