Skip to content
nexubDesign System
v2.4.0

Components · Overlays

Drawer

StableSince v0.0.1

Slide-in panel from any edge of the screen.

import { Drawer } from '@nexub/react';

Examples

Default

Bottom sheet

Props

Props
PropTypeDefaultDescription
Drawer.Rootcompound—Root provider that manages open/close state.
Drawer.Triggercompound—Element that opens the drawer.
Drawer.Portalcompound—Portals the overlay and content into the document body.
Drawer.Overlaycompound—Dimmed backdrop rendered behind the drawer.
Drawer.Contentcompound—The drawer panel. Accepts a side prop.
scrollLock'style' | 'class'—On Drawer.Root. How page scroll is locked while open. class adds a class from @nexub/themes/base instead of injecting a <style> tag, so it works under a strict CSP (style-src 'self'). Default style.
side'left' | 'right' | 'top' | 'bottom'—Edge of the screen from which the drawer slides in.
Drawer.Headercompound—Header section of the drawer panel.
Drawer.Footercompound—Footer section of the drawer panel.
Drawer.Titlecompound—Accessible title for the drawer.
Drawer.Descriptioncompound—Supporting description text for the drawer.
Drawer.Closecompound—Element that closes the drawer.
surface'solid' | 'glass''solid'Glass material on Drawer.Content — see Foundations → Materials.