Drawer

A panel that slides in from the side.

Example

tsx
<Drawer side="right">
  <DrawerTrigger>Open cart</DrawerTrigger>
  <DrawerBody>
    <Stack gap="md">
      <DrawerTitle>Your cart</DrawerTitle>
      <Text variant="muted">Nothing here yet.</Text>
      <DrawerClose>Close</DrawerClose>
    </Stack>
  </DrawerBody>
</Drawer>

Usage

Pages are built on the server: import the tags from @dash/server and return the tree. The browser runtime draws it.
tsx
import { Drawer, DrawerTrigger, DrawerBody, DrawerTitle, DrawerClose, Text, Stack } from "@dash/server";

Props

DrawerProps

Prop
Type
Description
defaultOpenboolean
openboolean
onOpenChange(open: boolean) => void
side"left" | "right"
On this page