Drawer

Bottom drawer with sketch pull handle.

<Drawer roughness={1.5}>
  <DrawerTrigger asChild>
    <Button variant="outline">Open drawer</Button>
  </DrawerTrigger>
  <DrawerContent>...</DrawerContent>
</Drawer>

CLI install

npx doodleui-react add drawer

Usage

import { Drawer, DrawerTrigger, DrawerContent, DrawerHeader, DrawerTitle, Button } from "doodleui-react";

<Drawer>\n  <DrawerTrigger asChild>\n    <Button>Open</Button>\n  </DrawerTrigger>\n  <DrawerContent>\n    <DrawerHeader>\n      <DrawerTitle>Title</DrawerTitle>\n    </DrawerHeader>\n  </DrawerContent>\n</Drawer>

Props

PropTypeDefaultNotes
animatebooleantrueBottom slide-up panel with sketch handle and draw-in border. Overrides DoodleUIProvider. Reduced motion disables this unless the provider set forceAnimate.
roughnessnumber1.5How wobbly the stroke is. 0 is almost geometric. 3+ is messy.
seednumberprovider / randomLocks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed.
sketchColorstring#1f1d1aStroke color. Also tints primary/accent fills where relevant.
classNamestringundefinedPassed through to the root element.
styleCSSPropertiesundefinedPassed through to the root element.