On this page
Drawer
Provides an edge drawer with swipe gestures, stacking, and menu composition.
Overview
Copy the source into your project. Import the parts that you need. Styles use local StyleX declarations and shared theme tokens. You can change the source without a wrapper or replacement package.
Preview
Station updates drawer
Installation
Run the init command from your project root first. The CLI configures StyleX and installs shared files and dependencies.
Run from your project root. The CLI installs required components, shared files, and packages. Previews may need additional components. The CLI keeps existing files.
Usage
Compose DrawerTrigger and DrawerPopup inside Drawer, with DrawerTitle, DrawerDescription and DrawerPanel in the popup.
position selects the edge and sets the default swipe direction. DrawerPopup includes the portal, backdrop, and viewport. Use frameTitle for an optional frame caption. DrawerTitle gives the dialog its accessible name. DrawerContent is the Base UI content region. It is not an alias for DrawerPopup.
The drawer uses one sidebar-colored surface for its frame, content, and footer. The close button is hidden by default. Set showCloseButton to show it. DrawerMenu parts arrange actions inside a drawer. They do not turn the drawer into an anchored Menu.
Import from the local file installed by the CLI.
API reference
The generator reads the component TypeScript source. Only component and Base UI props appear below. The Required column shows whether you must supply a property. It does not mean you must use the component.