Lambda UI
v1.3.4
Stable

Drawer

Drawer component is a slide-out panel that overlays content, commonly used for navigation menus or additional content.

Playground

Experiment with all the properties of the Drawer component in real time.

Properties
title

Content for the drawer header/title.

placement

Side from which the drawer slides in.

width

Width of the drawer (for left/right placement).

backdropType

Style of the backdrop overlay.

showCloseButton

If true, displays a close button in the header.

closeOnOverlayClick

If true, clicking the overlay closes the drawer.

closeOnEscape

If true, pressing Escape closes the drawer.

Usage

import { Drawer, Button } from "lambda-ui-components";
import { useState } from "react";

export default function App() {
	const [isOpen, setIsOpen] = useState(false);

	return (
		<>
			<Button onClick={() => setIsOpen(true)} label="Open Drawer" />
			<Drawer
				isOpen={isOpen}
				onClose={() => setIsOpen(false)}
				title="Navigation"
				placement="left"
			>
				<div className="p-4">
					<p>Drawer content goes here</p>
				</div>
			</Drawer>
		</>
	);
}

Placement Options

The placement prop controls which side of the screen the drawer slides in from. Options are left, right, top, and bottom.

API Reference

Props

Prop
Default
Type
isOpen
false
boolean
onClose
undefined
() => void
children
undefined
ReactNode
title
undefined
ReactNode
footer
undefined
ReactNode
placement
"left"
"left" | "right" | "top" | "bottom"
width
"small"
"xsmall" | "small" | "medium" | "half" | "full"
backdropType
"dark"
"dark" | "blur" | "transparent"
size
undefined
string
showCloseButton
true
boolean
closeOnOverlayClick
true
boolean
closeOnEscape
true
boolean
The modern React component library.
© 2026 Lambda UI. Made with in Mexico by AletzMan.