Drawer

Date PickerDropdown Menu

A panel that slides in from any edge of the screen.

Installation

pnpm add krz-ui

Usage

import { Drawer } from "krz-ui";
<Drawer
  open={open}
  onClose={() => setOpen(false)}
  side="right"
  title="Filters"
  footer={<Button onClick={apply}>Apply</Button>}
>
  ...
</Drawer>

API Reference

PropTypeDescription
open / onCloseboolean / () => voidVisibility and close handler.
side"left" | "right" | "top" | "bottom"Edge the panel slides from. Defaults to right.
sizenumber | stringWidth (left/right) or height (top/bottom).
title / description / footerReactNodeHeader text and bottom actions.
closeOnOverlayClick / closeOnEscbooleanBoth default to true.
className / style / ref—All go to the dialog panel. Style the backdrop with classNames.overlay. See Customization.
classNames{ root?, overlay?, header?, title?, description?, close?, body?, footer? }Extra classes for inner parts.