Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

No Channels Empty State Block for React

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.

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 team chat as the dialog that fills it, with this no channels empty state for React with Base UI. The host is Hashmoor, a team chat: its header holds the real Browse channels button, and under it a stage draws the chat shell, a rail of channels (three dashed places, nothing joined yet) beside a conversation. Drawn open in place over it is the Dialog: a large hash sign in outline with one dashed bar, a search Input that filters five channels by name or line, and a row for each with its name, one line, how many are in it and a Toggle that reads Join, then Selected. The Shine Button, the only colored control, counts what is chosen ("Join 2 channels"); pressing it closes the dialog, adds a row with a hash to the rail of the shell behind it, and turns the dashed bar solid. Pressing Browse channels opens the real modal with the same content, so what you chose in place is there. The frame is ruled by Guides, and everything moves with CSS only. For the channel directory of any chat, forum or community app.

FAQ

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

The channels you join stay in the page's state: the rail behind the dialog lists them, nobody is told and a reload empties it, and Start over empties the rail without one. To wire it for real, add the member to each chosen channel where the code says so, take the rail's rows from your response, and show a failure in the dialog's status line.

What is the in-place dialog, and what is the real one?

Shown open in place for the preview, so the block shows its content without a click: on load the dialog is drawn as a plain non-modal element over the stage and nothing is trapped or focused. Pressing Browse channels opens the real Dialog, with its focus trap, Escape to close it and focus back on the button, and the in-place copy stays closed until a reload. In your app keep only the Dialog and its trigger.

What does Join do?

It lists the chosen channels in the rail behind the dialog and closes it. With nothing chosen the button stays quiet and says "Pick a channel first" when pressed. Reopening the dialog shows what you joined as Selected, and pressing Cancel or Escape leaves it as it was.

Is it usable with a keyboard and a screen reader?

Each Join toggle is named for its channel, such as Join #launch-room, and keeps that name when pressed, so it is read as pressed. Tab runs through the search, the toggles, Cancel and Join. The drawings are hidden from assistive technology and a polite status line says what changed once the dialog has closed.

How does it look on a phone?

The in-place dialog docks to the foot of the stage with rounded top corners, its body scrolls and its Join button stays pinned in the footer. The real dialog keeps the catalog's phone layout, which sticks to the bottom of the screen. Nothing scrolls sideways, even at 320 px wide.

  • Pro

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

  • 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

    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

    Command Palette Dialog

    Pickers and search

    A docs workspace's command palette shown open over its page: Recent and Pages when the field is empty, and a typed greater-than, at or hash turns it to Actions, People or Pages, each with its own groups and count, and each choice edits the drawn page.

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

  • Pro

    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.