Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Channel Settings Notification Block for React

A team chat window with a rail of channels, each with a notification setting (All messages, Mentions only, Muted) that changes its mark and which messages the pane lists.

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

Let people decide what each channel may tell them, with this channel window for React with Base UI. A fixed-height window holds a rail of five channels, a # and a name each, beside the open channel's recent messages. The top bar names the channel and holds its notification Select: All messages, Mentions only or Muted. The choice changes two things at once. The channel's mark in the rail becomes a count of unread messages, a dot when one mentions you, or nothing; and the pane lists everything, only the messages that mention you, or a quiet "muted" panel. Messages show their thread's reply count and reaction chips as icons with counts, never emoji, and the tag that mentions you is marked in a solid tint. Mark read clears a channel. On a phone the rail gives way to a Native Select of channels. It's built from Select, Native Select, Avatar, Empty and Guides, with a CSS entrance only. For a team chat, a community or any app where channels can be quieter than others.

FAQ

How do I fill it with my own channels and messages?

Edit CHANNELS, START (each channel's setting when the page opens) and MESSAGES: a message has its channel, who wrote it (by), an ISO at, the text, how many replies its thread has, its cheers (a face and a count each), whether it tags you (mention) and whether it was unread. The marks, the counts and the line over the messages are worked out from those lists and from the setting of each channel.

What exactly changes when I change a channel's setting?

With All messages the channel's mark counts its unread messages. With Mentions only it is a dot when an unread message mentions you, and nothing otherwise, and the pane lists only the messages that mention you ("Showing 1 of 6"). Muted shows no mark, the row turns quieter and the pane becomes a panel that says the channel is muted. A channel's name always carries its state for a screen reader ("ops-handoff, 3 unread messages"), so the mark is never the only signal.

What stays local, and how do I make it real?

Everything. Settings and read state live in the page and reset on reload, nothing is sent, and the messages are typed in the file. To make it real, save the setting from the change handler to your preferences service, load the messages for the open channel from your API and clear the unread marks from markRead.

How does it work from the keyboard?

Tab runs through the channels, the Mark read button, the setting and the messages (the list is one scrolling region you can focus and scroll with the arrow keys). A channel is a button and the open one is marked as the current one. The setting is a select list: Enter, Space or an arrow key opens it, the arrow keys move through it and Enter chooses.

Does the window change height?

Never. The window has a fixed height and only the message region scrolls inside it; it opens on the newest message and keeps that position as you change channels or settings.

How does it look on a phone?

The rail is hidden and a native select of channels sits under the top bar, each option saying its unread count or that it is muted. The top bar keeps the channel's name, a Mark read icon button (with its name for a screen reader) and the setting.

  • Pro

    A mail client in a fixed-height window: mailboxes and labels whose counts follow the mail you file, a searchable message list beside the open message, and Compose for a local draft.

  • Pro

    A notification preference matrix: five kinds of notification down the page and four channels across, a checkbox in every cell, an all-types row that turns a channel on or off, marks on changed cells and an unsaved count.

  • 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 focus app's do-not-disturb panel: a status card that says in a sentence what the settings amount to, a 24-hour strip of the muted hours, one hour, until tomorrow or a nightly schedule, and the calls that still get through.

  • Pro

    What a notification email looks like before it is sent: pick Mention, Weekly digest or Security alert, switch between desktop and phone width, and Send me a test, which only says it was queued.

  • Pro

    A meeting app's sound settings: a master switch, a volume slider with a level meter, a switch and a tone for each kind of notification, and a Play button that makes a real short tone in your browser when pressed.