shadcn.io is not affiliated with official shadcn/ui
Sheet examples · Navigation
Nested Navigation Menu Sheet for React
A left-side menu sheet with Products and Resources headings, each over its own indented links.
Two levels of navigation in a left-side sheet: Products and Resources as headings, each over three indented links. The sections come from a static array, and ps-4 indents the links on the reading side, so the layout mirrors in right-to-left.
Preview
Installation
FAQ
How are the sections built?
From a static array of two sections, each a heading and its links. Products holds All Products, New Arrivals and Best Sellers; Resources holds Documentation, Guides and API Reference.
How are the child links indented?
Their column has ps-4, padding on the start side, so the indent moves to the right in right-to-left layouts.
Can the sections collapse?
Not in this demo: both are always open. Wrap each section in a Collapsible with the heading as its trigger to fold it away.
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.
Related
- Sidebar Navigation SheetA left-side navigation sheet with
- Mobile Menu SheetA left-side menu sheet with four page
- Multi-Level Nested AccordionAn accordion of help center topics where
- Simple Navigation Navigation MenuA navigation menu with Products and
- Navigation with Search SheetA left-side menu sheet with a search
- Navigation with User Profile SheetA left-side menu sheet with the signed-in