shadcn.io is not affiliated with official shadcn/ui
Drawer examples · Left
Left Drawer Navigation Menu for React
A left drawer with a navigation menu of icon buttons: Home, Team, Projects, Settings and Help.
A navigation menu in a left drawer: five ghost buttons with an icon and a label each, in a nav. The menu button that opens it is icon-only, so it carries an aria-label. Swap the buttons for links to your pages.
Preview
Installation
FAQ
Which items does the menu have?
Home, Team, Projects, Settings and Help, each a ghost Button with justify-start, an icon marked data-icon="inline-start" and its label.
How do I make the items links?
Render each Button as your router's link.
Pass the link with render and set nativeButton={false}.
Where is the drawer's title?
Navigation, above the menu, is the DrawerTitle. DrawerTitle names the dialog for assistive tech, so every drawer renders one; give it sr-only when the design has no visible heading.
How does the drawer open from the left?
swipeDirection="left" on Drawer puts it on the left edge. The prop names the swipe that closes the drawer, so left docks it on the left; leave it out for a bottom drawer.
Related
- Simple Left DrawerA drawer that slides in from the left
- Left Drawer with Nested ItemsA left drawer menu whose Products and
- Left Drawer with SearchA left drawer with a search field above
- Pagination Button GroupPagination in a button group with
- Simple Bottom DrawerA bottom drawer with a title, a
- Left Drawer File ExplorerA left drawer with a file tree whose