Drawer
A draggable bottom panel with compact content, floating surfaces and scroll-to-expand pages.
Floating drawer
No handle
Scroll to full screen
Responsive dialog
Installation
Install the shared package once in your Exact app. This version is a beta.
bun add --exact @rightui/ui@0.4.0-beta.4
The Exact compiler requires Bun 1.4.2, regardless of which package manager installs the package.
Complete the font, app metadata and root provider setup (required for both installation methods).
Import
use Drawer, DrawerAdvanced, DrawerContent, DrawerOptions, DrawerBody, DrawerInset, DrawerFooter from "@rightui/ui"
Usage
Use Drawer or DrawerAdvanced for an internally managed bottom panel. DrawerContent adds a controlled snapPoint/changeSnap pair and DrawerOptions for detached surfaces, optional controls, backdrop opacity, bounce and scroll behavior. Compose fixed content with DrawerInset and DrawerFooter around a DrawerBody. Each scroll body has its own compact inset; avoid duplicating it. Scroll-to-expand animates to full available height while preserving the same controls. See docs/DRAWER.md for all required props and the scroll/resize boundary.
Keyboard
On the resize handle: ArrowUp/ArrowDown select the next/previous stop, Home/End select the smallest/largest stop, and Enter/Space cycle stops. Escape dismisses. Tab/Shift+Tab remain within the handle, close button and supplied focusIds.
API Reference
Properties from the component source. State lives in your component; actions receive the updated value.
Drawer.id
string
Drawer.open
bool
Drawer.title
string
Drawer.description
string
Drawer.reduced
bool
Drawer.focusIds
string[]
Drawer.dismiss
action
DrawerAdvanced.id
string
DrawerAdvanced.open
bool
DrawerAdvanced.title
string
DrawerAdvanced.description
string
DrawerAdvanced.reduced
bool
DrawerAdvanced.focusIds
string[]
DrawerAdvanced.dismiss
action
DrawerAdvanced.snapPoints
number[]
DrawerAdvanced.initialSnap
number
DrawerContent.id
string
DrawerContent.open
bool
DrawerContent.title
string
DrawerContent.description
string
DrawerContent.reduced
bool
DrawerContent.focusIds
string[]
DrawerContent.dismiss
action
DrawerContent.snapPoints
number[]
DrawerContent.snapPoint
number
DrawerContent.changeSnap
action
DrawerContent.options
DrawerOptions
DrawerBody.compact
bool
DrawerBody.id
string
DrawerBody.expanded
bool
DrawerBody.expandOnScroll
bool
DrawerBody.expand
action
DrawerInset.compact
bool
DrawerFooter.compact
bool