- Android
- iOS
- Web
Drawer
Reveal a panel from the edge of a screen.
Engine API NDrawernayan-ui/components
Mount NDrawer around a screen or navigator. The open state can be controlled by the screen or by useNDrawer.
Example.tsx
| Name | Type | Default | Details |
|---|---|---|---|
| accessibilityLabel | string | Optional | |
| children | ReactNode | Required | Navigator/page content is retained. Routing belongs to the host app. |
| defaultOpen | boolean | Optional | |
| drawerContent | ReactNode | Required | |
| drawerStyle | Record<string, unknown> | Optional | |
| edgeWidth | number | Optional | |
| enabled | boolean | Optional | |
| isOpen | boolean | Optional | |
| onOpenChange | ((open: boolean) => void) | Optional | |
| overlayColor | string | Optional | |
| side | "left" | "right" | Optional | |
| swipeEnabled | boolean | Optional | |
| width | number | Optional |