Skip to main content

Drawer

A slide-in side panel — same backdrop/dismiss behavior as Sheet, anchored to the left or right edge instead of the bottom.

Open drawer
const [isVisible, setIsVisible] = useState(false);

<Button label="Open drawer" onPress={() => setIsVisible(true)} />
<Drawer isVisible={isVisible} onClose={() => setIsVisible(false)}>
<MenuContent />
</Drawer>

From the right​

Open right drawer
<Drawer isVisible={isVisible} onClose={() => setIsVisible(false)} edge="right">
<FiltersPanel />
</Drawer>

Props​

PropTypeDefaultDescription
isVisiblebooleanRequired. Controls visibility.
onClose() => voidRequired. Called on backdrop press, drag-dismiss, or onRequestClose.
edge'left' | 'right''left'Which edge the drawer slides in from.
closeOnBackdropPressbooleantrueCloses when tapping outside the drawer.
animation'fade' | 'slide' | 'scale''slide'How the drawer enters/exits.
dismissOnDragbooleantrueDrag the drawer toward its edge to dismiss it.
widthnumber300Width of the drawer panel.
bgTVajraColors'surface'Panel background color.
roundedTRoundedTokenCorner radius on the panel's open edge.
pTSpacingToken's-4'Panel padding.
backdropColorTVajraColors'overlay'Backdrop color.