Components · Overlays
Sheet
StableSince v0.0.1
Alias for Drawer — slide-in sheet panel.
import { Sheet } from '@nexub/react';Examples
Default
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| Sheet.Root | compound | — | Root provider that manages open/close state. Exported from Drawer. |
| Sheet.Trigger | compound | — | Element that opens the sheet. |
| Sheet.Portal | compound | — | Portals the overlay and content into the document body. |
| Sheet.Overlay | compound | — | Dimmed backdrop rendered behind the sheet. |
| Sheet.Content | compound | — | The sheet panel. Accepts a side prop. |
| scrollLock | 'style' | 'class' | — | On Sheet.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 sheet slides in. |
| Sheet.Header | compound | — | Header section of the sheet panel. |
| Sheet.Footer | compound | — | Footer section of the sheet panel. |
| Sheet.Title | compound | — | Accessible title for the sheet. |
| Sheet.Description | compound | — | Supporting description text for the sheet. |
| Sheet.Close | compound | — | Element that closes the sheet. |
On iOS & Android: BottomSheet
@nexub/react-nativeAlpha
import { BottomSheet } from '@nexub/react-native';
<BottomSheet open={open} onOpenChange={setOpen} title="Details">…</BottomSheet>Web vs mobile
Same tokens and prop names. Where the platforms differ:
| Web | iOS & Android | |
|---|---|---|
| Edge | Any side. | Bottom only, with detents. |
Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.
On device

iPhone (iOS simulator)

Pixel (Android emulator)
Screenshots from the latest CI run of the showcase app; the live frame renders the same code for the web.
BottomSheet props
| Prop | Type | Default | Description |
|---|---|---|---|
| openrequired | boolean | — | — |
| onOpenChangerequired | (open: boolean) => void | — | — |
| detents | SheetDetent[] | ['content'] | Heights the sheet rests at: 'content' (fits its content) or a 0–1 fraction of the screen. |
| title | string | — | — |
| childrenrequired | React.ReactNode | — | — |
| dismissable | boolean | true | Drag down, tap the scrim or Android back closes it. |
| scroll | boolean | — | Let the content scroll (long lists). |