Search components

Find a component by name

Drawer

Swipeable sheet from any edge (Base UI Drawer): bottom sheet on mobile, side panels, snap points, nested and non-modal drawers, a swipe handle on any side; floats off the edges with rounded corners by default (floating={false} attaches it to the edge). Still accepts the direction, dismissible and asChild props from vaul.

Position

Set the side with swipeDirection: up, right, down (the default) or left.

Floating

Refer: drawers float 8px from the edges with every corner rounded, like a Dialog. floating={false} on DrawerContent attaches the drawer to the edge it comes from, with only the inner corners rounded.

Swipe handle

Bottom drawers show the handle by default. showSwipeHandle on Drawer adds it on any side; false hides it.

Nested

Open drawers from inside another drawer. Parent drawers stay mounted and stack behind the frontmost one.

Non modal

modal={false} lets people use the rest of the page while the drawer is open; disablePointerDismissal keeps it open on outside presses. modal="trap-focus" keeps focus inside without blocking scroll and pointer.

Snap points

snapPoints snaps a bottom or top drawer to preset heights: 0 to 1 is a fraction of the viewport, above 1 is pixels, and strings take px or rem. Track the active one with snapPoint and onSnapPointChange.

Responsive

ResponsiveDialog renders a Dialog from md (768px) up and a bottom Drawer below, with the same children.

Installation

npx shadcn@latest add @refer/drawer

Variations

Ported from shadcn's examples. Open Code on any section to see and copy it.

Demo
Swipe Handle
Position
Custom Width and Height
Scrollable Content
Snap Points
Nested
Non Modal
Mobile header (bottom drawer)

Below 768px, the title and description of a bottom or top drawer are centered; from md up they align left. Open it with a narrow window or on a phone, or see the frame below.

With controls inside

Usage in the apps

Which apps install this component, whether their copy matches the registry, and which files import it.

PortalIn sync6 files
ArgusDivergedNot imported
LandingDivergedNot imported
PartnersDivergedNot imported

Imported by 6 files across the apps. From olympus-backend@2ee40d05e, Oct 26, 2026. โ€œIn syncโ€ means the app's copy matches this registry; refresh with npm run usage:build.