Drawer Examples
22 panels people drag in from a screen edge: bottom sheets for phones, side panels and top bars, with swipe to dismiss and snap points. For React on Base UI, React Aria, Ark UI and Radix UI, and for Vue, Svelte and Solid. Each on React, Vue, Svelte and Solid, with Base UI, React Aria, Ark UI or Radix UI on React.
Every drawer example
22 examples.
- Bottom Drawer Event DetailsBottomA bottom drawer for Design Workshop 2024, with badges, the date, the place, 24 attendees, and Register Now.

- Bottom Drawer No Scale BackgroundBottomA bottom drawer titled No Background Scaling whose copy says the page stays put and only the overlay dims.

- Bottom Drawer with FormBottomA bottom drawer titled Add New Contact, with name, email, and phone fields, plus Add Contact and Cancel.

- Bottom Drawer with Snap PointsBottomA bottom drawer that lists snap heights of 148px, 355px, and full screen, and settles on the nearest.

- Left Drawer File ExplorerLeftA left Files drawer where Projects starts open and holds the Website and App folders and their files.

- Left Drawer Navigation MenuLeftA left Navigation drawer with Home, Team, Projects, Settings, and Help, each an icon and a label.

- Left Drawer with Nested ItemsLeftA left Menu drawer where Products and Orders expand, and Dashboard and Analytics stay single rows.

- Left Drawer with SearchLeftA left drawer with a search field, a Main Menu of Home, Team, and Documents, and a Settings group.

- Nested Bottom DrawersBottomA Parent Drawer with an Open Nested Drawer button that opens a second panel titled Nested Drawer.

- Right Drawer Filter PanelRightA right Filters drawer with category checkboxes, a price slider from $0 to $1000, ratings, Apply, and Reset.

- Right Drawer NotificationsRightA bell with a 5 badge opens a Notifications drawer that says 5 unread, plus Mark all as read.

- Right Drawer Settings PanelRightA right Settings drawer with notification and privacy switches, plus Save Changes and Cancel.

Or describe it. With Pro, your AI agent installs the drawer example you describe, on your framework and UI library.
Get ProGalleries
More component examples
8 related galleries, free: open one for its live examples and their code.
Pricing
Drawer examples MCP, with Pro
Your AI agent installs any of the 1364 examples, and every component, block and icon, with every Pro plan.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
A drawer is a modal panel that slides in from a screen edge and follows the finger: people drag it, swipe it away, and it can rest at snap points. It usually comes up from the bottom on phones, and can open from the left, right or top. shadcn.io's Drawer is built on Base UI, Ark UI or Radix UI's drawer (vaul) for React, and on Ark UI for Vue, Svelte and Solid. Each example in this gallery is one self-contained file.
Yes. Every drawer example is free to use in personal and commercial projects, with no attribution required. Seeing the code and installing an example takes a free shadcn.io account.
All three are modal. A Drawer can be dragged and swiped closed, and can stop at snap points, which suits touch screens. A Sheet slides in from an edge without the drag and suits desktop side panels. A Dialog is centered. A common responsive pattern shows a Dialog on wide screens and a Drawer on phones, with the same content.
Use a drawer for short tasks where the page behind still matters: a quick form, filters, a detail people dismiss after reading. Use a page for long flows, content that needs the whole screen, or anything people should be able to link to.
On React with Base UI, React Aria or Ark UI, and on Vue, Svelte and Solid, set `swipeDirection` on `Drawer` to `up`, `left` or `right`; it names the swipe that closes the drawer, and the default `down` is a bottom drawer. On Radix UI, set `direction` to `top`, `left` or `right`.
Pass `snapPoints` to `Drawer`, such as `["148px", "355px", 1]`: strings with a unit are heights, and numbers from 0 to 1 are fractions of the screen. The drawer opens at the first one and settles on the nearest as people drag.
Keep a visible way out, such as a Cancel button, and control the open state so you decide when it closes. Use a Dialog instead when an action must be confirmed and shouldn't be dismissed with a swipe.
Sign in with a free account and run the install command shown on the example's page. The CLI copies the example into your project, along with the Drawer component and anything else it uses that you don't have yet.
Check the viewport width with a media query and render a Dialog or a Drawer with the same content. Keep the open state outside both so switching between them doesn't lose it.
Give the body `min-h-0 flex-1 overflow-y-auto`, or cap it with a `max-h-*` class, so it scrolls between the header and the footer. For a control that needs its own drag, such as a slider, mark it so the drawer ignores drags that start there: `data-no-drag` on Ark UI and the ports, `data-base-ui-swipe-ignore` on Base UI and React Aria, `data-vaul-no-drag` on Radix UI.
shadcn.io's Drawer, which lives in your project: on Base UI's drawer for Base UI and React Aria, on Ark UI's for Ark UI, on vaul for Radix UI, and on Ark UI for Vue, Svelte and Solid. Styling is Tailwind CSS, and icons come from Lucide.
Yes. A drawer follows the modal dialog pattern: focus moves into it on open and stays there, Escape closes it and focus returns to the trigger. `DrawerTitle` names the dialog, so every example renders one, visible or visually hidden. Dragging is an extra; every example can also be closed without it.
The Drawer is a client component, since it manages its open state, focus and drag. Render it from a Server Component and pass the data it shows as props. Vue, Svelte and Solid render it like any other component.
4.9 out of 5 from 150+ developers
Every drawer example. One prompt away.
Every drawer example is free with an account. With Pro, your AI agent installs them from a prompt.
Get Pro























