Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Composer Ring Social Platform Navbar Block for React

A navbar for a neighbourhood network: four links with an unread count, a profile avatar and a Create post button that opens a composer with a 280-character ring and a Post button that disables over the limit.

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

A navbar for a social network in React with Base UI. The wordmark of Nestwork, a neighbourhood network, leads; Feed, Explore, Groups and Messages follow (Messages carries a count of three unread), the current page marked by a foreground stroke on the bar's bottom edge; a profile avatar and a Create post button close the row. The button opens a composer: a popover from the md breakpoint, a drawer from the bottom below it. The composer is a text area with a character ring that fills as you write toward 280. With 20 characters remaining a warning icon and the count appear beside the ring, and the Post button is disabled while the post is empty or over the limit. Posting clears the field and says "Posted to Maple Court."; nothing is sent, the draft and the confirmation live in this page. It's built from Popover, Drawer, Textarea, Circular Progress, Badge, Avatar, Sheet, Shine Button and Guides. For community and social products with a quick post in the page's chrome.

FAQ

How does the character count work, and what does a screen reader hear?

The ring is Circular Progress in the foreground tone, filled to the share of 280 used; it is decoration. Below 20 characters remaining the warning icon (the only coloured part, on the icon, never on text) and the number appear beside it, in a space reserved for them. A hidden status region speaks only at the thresholds: "20 characters remaining", "10 characters remaining", "Limit reached" and "Over the limit", so it never reads out every keystroke.

What happens over the limit?

You can keep typing: the ring stays full, the count goes negative, and the Post button is disabled (and a submit does nothing) until the post is 280 characters or fewer. An empty or blank post can't be posted either. Change LIMIT and WARN_AT at the top of the file for other numbers; the spoken stages are in warning.

Does Post send anything?

No. It clears the field and shows "Posted to Maple Court." in a polite status; typing again removes it. To send a post, call your API from post and clear the field when it answers. A draft you close the composer on is kept, and opens again with the field focused.

How does the composer work with a keyboard?

Enter or Space on Create post opens the popover and focuses the field; Tab moves to Post; Escape or a click outside closes it and returns focus to the button.

How does it work on a phone?

Below md Create post becomes an icon button that opens the same composer as a drawer from the bottom (swipe it down or press Escape to close); below sm the avatar goes; below lg a menu button opens a sheet from the top with the four links and the unread count.

  • Pro

    Notification Bell Navbar

    Meters and progress

    An app navbar for a team inbox with a bell whose count follows what you do: the bell opens a panel with All and Unread tabs, rows you can mark read, mark unread or dismiss, and Mark all as read, and a drawer on phones.

  • Pro

    Create Menu Navbar

    App toolbars

    An app bar with a Shine Create button that opens a grouped menu with working key hints and a New from template submenu, and a bottom drawer with the same rows on phones.

  • Pro

    A conversation header for a team chat app: the channel name and member count, a one-line pinned message that cycles to the next pin when pressed, member avatars and Voice and Video call links with tooltips.

  • Pro

    A navbar for an add-on store with a Categories menu of six categories and their counts, and a search whose popup lists add-ons with an icon tile, drawn stars, an install count and a category.

  • Pro

    Usage Ring AI Product Navbar

    Meters and progress

    A one-bar navbar for a language-model API: five links, and a usage ring in the bar, one button that opens a popover with the tokens used, the limit, the reset and the plan, beside an Upgrade Shine Button.

  • Pro

    A one-bar marketing navbar for a product roadmap tool: a wordmark, a Product menu of four areas with icons and one-line descriptions, plain links with the current page marked, Sign in and a Shine Button, and a sheet with the same links on phones.