Skip to content

Drawer

Panel that slides in from an edge of the screen.

Installation

bun add @xerobi/ui
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger } from "@xerobi/ui/drawer"

This component is client-side. In Astro, hydrate it with a client directive.

API reference

Drawer

Also accepts every prop of Base UI Drawer.

PropTypeDescription
showSwipeHandleboolean

DrawerClose

No props of its own.

DrawerContent

No props of its own.

DrawerDescription

No props of its own.

DrawerFooter

Also accepts every prop of <div> element.

No props of its own.

DrawerHeader

Also accepts every prop of <div> element.

No props of its own.

DrawerOverlay

No props of its own.

DrawerPortal

No props of its own.

DrawerSwipeHandle

Also accepts every prop of <div> element.

No props of its own.

DrawerTitle

No props of its own.

DrawerTrigger

No props of its own.

Styling hooks: [data-slot="drawer"], [data-slot="drawer-trigger"], [data-slot="drawer-portal"], [data-slot="drawer-close"], [data-slot="drawer-overlay"], [data-slot="drawer-swipe-handle"], [data-slot="drawer-viewport"], [data-slot="drawer-popup"], [data-slot="drawer-content"], [data-slot="drawer-header"], [data-slot="drawer-footer"], [data-slot="drawer-title"], [data-slot="drawer-description"].

Search documentation

Search pages, components and blocks.