Skip to Content
Liquid Glass UI
Components

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: DrawerContent mounts <LiquidSurfaceBackdrop /> (glass={true}) by default, applying 32px top corner radii with openBottom refraction when sliding from the bottom without clipping child Switch or Slider LiquidLens sampling.
  • Native gestures: Includes an Apple 27 grabber handle (showSwipeHandle enabled by default), four-way swipeDirection="down" | "up" | "left" | "right", and snapPoints height 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:

apple-liquid-ui/preview/drawer-liquid-hero
MacBook · 16:10

Installation (Shadcn Registry)

# Install via the configured @apple-liquid namespace (includes liquid-surface and liquid-glass)
npx shadcn@latest add @apple-liquid/drawer

Four-Way Directions

Slide from bottom, top, left, or right via swipeDirection, automatically adjusting edge radii and handle orientation:

apple-liquid-ui/preview/drawer-directions
MacBook · 16:10

Snap Points

Pass snapPoints={[0.45, 0.85]} for Apple Maps-style half-height ↔ expanded gesture detents:

apple-liquid-ui/preview/drawer-snap-points
MacBook · 16:10

Props API

Drawer

PropTypeDefaultDescription
swipeDirection'down' | 'up' | 'left' | 'right''down'Edge slide-in and swipe-to-dismiss direction
showSwipeHandlebooleantrueShow the top/side grabber handle
snapPoints(number | string)[]—Multi-step height detents (e.g. [0.45, 0.85])
modalbooleantrueRender with modal backdrop

DrawerContent

PropTypeDefaultDescription
glassbooleantrueLiquid Glass material reacting to glass tint; false renders a 100% opaque surface
backdropReact.ReactNode—Custom backdrop refraction node for composite components

On this page