Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Create Menu Navbar Block for React

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.

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 Create menu for React with Base UI, in the app bar of a workspace app for boards and documents called Forgebench. The wordmark and four links lead (Boards is current, marked by a foreground stroke on the bar's bottom edge), a line says what was last created, and a Create Shine Button closes the row. It opens a menu over the page in three parts: Work (a task, a document, a board), Team (invite a teammate, a channel) and a New from template submenu of three templates. Every row with a key shows it, and the keys work: press T, D, B, I or C with the menu closed and the same thing happens. Choosing a row, or pressing its key, rewrites the line ("Created: New board") and says it in a polite status. Below the md breakpoint the button keeps its plus and opens a drawer from the bottom with the same rows, the templates as a group of their own, and the links move into a sheet from the top. The block stays one bar high (64 pixels, 56 on a phone). It's built from Dropdown Menu, Drawer, Sheet, Guides, Shine Button and Button, with your theme's tokens for every colour. For apps that start most work from one place, and not the dock of the Pill Quick Actions banner.

FAQ

How do I change what the menu creates?

Edit WORK, TEAM and TEMPLATES at the top of the file: each row is a label, an icon, a value and, for the first two groups, the hint key. The menu, the key handler and the phone drawer all read the same arrays, so they never drift apart. Replace pick (and the key handler's setLast) with the call that really creates the thing; the line in the bar and the status then say what happened.

Do the key hints work?

Yes, outside the menu. A key with no modifier, pressed when focus isn't in a field and no menu or dialog is open, does what its row does. Shift, Ctrl, Alt and Cmd combinations are left to the browser. With the menu open the keys are the menu's own type-ahead (the first row starting with the letter takes focus), so a stray letter never creates anything. On a phone the drawer shows no hints: there's no keyboard to teach.

How does it work with a keyboard and a screen reader?

The links sit in a nav landmark named Main, after the wordmark (a link home). Create says whether its menu is expanded; the groups are named Work and Team, the submenu row says it has a popup, and a polite status reads "Created: New task" after a choice. Enter, Space or the Down arrow opens the menu with focus on the first row; the arrows, Home and End move between rows, the Right arrow opens the templates, the Left arrow closes them, and Escape closes the templates first, then the menu. Choosing a row and Escape both return focus to Create.

How does it work on a phone?

Below the md breakpoint the wordmark, Create and a menu button stay on the bar, and nothing wraps at 320 pixels: Create keeps its plus (its name stays "Create" for screen readers) and the status line is read but not drawn. Create opens a drawer from the bottom with a grabber, three groups of rows (Work, Team, New from template) with large touch targets. Focus moves into the drawer and stays there; Escape, a swipe down, a tap outside it or choosing a row closes it, and focus goes back to Create. The menu button opens a sheet from the top with the four links.

Does it work right to left?

Yes. The bar mirrors, the menu opens under Create's start edge, key hints and the submenu arrow follow the direction, and the submenu opens toward the end when the start side has no room. The wordmark is artwork and keeps its direction. Wrap the block in your direction provider (the catalog's DirectionProvider) so the menu follows the page.

What moves, and what happens with reduced motion?

Nothing moves on load. A band of light sweeps across Create once on hover and keyboard focus, the menu opens with the library's fade, and the drawer and the sheet slide in. With reduced motion the light fades in where it stands and the drawer and the sheet appear without sliding.

  • Pro

    Account Menu Navbar

    Accounts and scopes

    An app bar with an account button behind a split divider that opens a menu: an identity header with plan badge and storage bar, a Switch account radio list, and Profile, Settings, Billing and Sign out.

  • Pro

    A navbar for a notes app with a field-looking button and a shortcut that open a command palette: recent notes first, then pages, actions and settings in labelled groups, with the keys that work shown beside each row.

  • Pro

    An app navbar whose shortcuts work: G then H, P or S moves between pages, a question mark opens a dialog with every key in a table, and each link shows its keys on hover and keyboard focus.

  • 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

    A dock pill for a workspace app: a toolbar of four icon buttons (New page, Search, Share, Notifications), each with a tooltip showing its name and its key.

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