Drawer
Gesture-driven drawer built to iOS 27 edge-hugging rounded Liquid Glass guidelines, supporting four-way swipe edges, multi-step Snap Points, and isolated-layer SDF optical refraction.
Fully compatible with the standard shadcn/ui JSX API (<Drawer> / <DrawerTrigger> / <DrawerContent> / <DrawerHeader> / <DrawerFooter> / <DrawerTitle> / <DrawerDescription> / <DrawerClose>), and serving as the underlying mobile (< 768px) gesture container for Select, Dialog, Popover, DropdownMenu, and ContextMenu:
- Isolated-layer Liquid Glass refraction:
DrawerContentmounts<LiquidSurfaceBackdrop />(glass={true}) by default, applying32pxtop corner radii withopenBottomrefraction when sliding from the bottom without clipping childSwitchorSliderLiquidLenssampling. - Native gestures: Includes an Apple 27 grabber handle (
showSwipeHandleenabled by default), four-wayswipeDirection="down" | "up" | "left" | "right", andsnapPointsheight detents.
Liquid Glass Drawer Preview
Drag the top handle to dismiss; embedded Slider and Switch controls preserve full optical refraction over the Liquid Glass backdrop. Adjust the left Glass Tint slider to compare clear and tinted levels:
Installation (Shadcn Registry)
# Install via the configured @apple-liquid namespace (includes liquid-surface and liquid-glass)
npx shadcn@latest add @apple-liquid/drawerFour-Way Directions
Slide from bottom, top, left, or right via swipeDirection, automatically adjusting edge radii and handle orientation:
Snap Points
Pass snapPoints={[0.45, 0.85]} for Apple Maps-style half-height ↔ expanded gesture detents:
Props API
Drawer
| Prop | Type | Default | Description |
|---|---|---|---|
swipeDirection | 'down' | 'up' | 'left' | 'right' | 'down' | Edge slide-in and swipe-to-dismiss direction |
showSwipeHandle | boolean | true | Show the top/side grabber handle |
snapPoints | (number | string)[] | — | Multi-step height detents (e.g. [0.45, 0.85]) |
modal | boolean | true | Render with modal backdrop |
DrawerContent
| Prop | Type | Default | Description |
|---|---|---|---|
glass | boolean | true | Liquid Glass material reacting to glass tint; false renders a 100% opaque surface |
backdrop | React.ReactNode | — | Custom backdrop refraction node for composite components |
Direction
Provides right-to-left (RTL) text direction context for Arabic, Hebrew, and other RTL interfaces so Slider, Switch, and Base UI controls mirror automatically.
DropdownMenu
Responsive Apple Liquid Glass dropdown menu displaying a floating macOS 27 Liquid Glass menu with #0069F9 highlights on desktop, and automatically adapting to a swipe-to-dismiss iOS 27 bottom Liquid Glass Drawer with submenu drill-down on mobile.