Component referenceSource owned

Drawer

A drawer component that slides out from the edge of the screen.

Upstream reference
On this page4 sectionsBack to top
Live preview
Loading preview...

#Installation

npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/drawer.json

#Usage

import { Button } from "@/components/ui/button";
import {
  Drawer,
  DrawerClose,
  DrawerContent,
  DrawerDescription,
  DrawerFooter,
  DrawerHeader,
  DrawerTitle,
  DrawerTrigger,
} from "@/components/ui/drawer";
<Drawer>
  <DrawerTrigger asChild>
    <Button>Open</Button>
  </DrawerTrigger>
  <DrawerContent>
    <div className="mx-auto w-[300px]">
      <DrawerHeader>
        <DrawerTitle>Are you absolutely sure?</DrawerTitle>
        <DrawerDescription>This action cannot be undone.</DrawerDescription>
      </DrawerHeader>
      <DrawerFooter className="grid grid-cols-2">
        <Button variant="noShadow">Submit</Button>
        <DrawerClose asChild>
          <Button className="bg-secondary-background text-foreground" variant="noShadow">
            Cancel
          </Button>
        </DrawerClose>
      </DrawerFooter>
    </div>
  </DrawerContent>
</Drawer>

#Examples

#With Scrollable Content

Loading preview...