Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Sheet examples · Navigation

Navigation with Search Sheet for React

A left-side menu sheet with a search field above five page links.

Framework
UI library

A left-side menu with a search field above Home, Products, Services, Blog and Contact. The field is a search input with its own label for screen readers; filter the links, or send the query to your site search.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

How is the search field labeled?

It has aria-label="Search menu" and type="search", since no visible label sits above it. The placeholder isn't a label: it disappears as people type.

Does the sheet close when a link is clicked?

Links in a sheet don't close it. When a link changes the page, close the sheet in its click handler, or let your router's navigation unmount it. To close it from code, control the open state: Pass open to Sheet; onOpenChange receives the next boolean.

How does the Menu button open the sheet?

The outline button labeled Menu is the trigger, and its text is the accessible name. The Button goes in the render prop of SheetTrigger, and the label stays its child.

Which edge does the menu use?

side="left" on SheetContent slides the panel in from the left, where people look for a menu. It fills the height and caps its width from the sm breakpoint.