Preet Suthar

Drawer

Buttons 13

About

A customizable drawer component built on top of Vaul with smooth animations and flexible positioning.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Drawer to your project and fits it to your theme.

Code

How Drawer is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import {
  Drawer,
  DrawerContent,
  DrawerHeader,
  DrawerTitle,
  DrawerDescription,
  DrawerFooter,
  DrawerTrigger,
  DrawerClose,
  DrawerCloseButton
} from "@/components/ui/drawer";

import { Button } from "@/components/ui/button"

export default function DemoOne() {
  return(
    <>
      <Drawer>
        <DrawerTrigger asChild>
          <Button variant="outline">Open Drawer</Button>
        </DrawerTrigger>
        <DrawerContent>
          <DrawerHeader>
            <DrawerTitle>Basic Drawer</DrawerTitle>
            <DrawerDescription>
              This is a basic drawer component.
            </DrawerDescription>
          </DrawerHeader>
          <DrawerFooter>
            <Button>Submit</Button>
            <DrawerClose asChild>
              <Button variant="outline">Cancel</Button>
            </DrawerClose>
          </DrawerFooter>
        </DrawerContent>
      </Drawer>
    </>
  );
}

Dependencies

More by Preet Suthar

View all
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.8K
  • Shining Text

    Shining Text

    1.7K
  • Magic Text

    Magic Text

    897
  • Toolbar

    Toolbar

    861
  • Hero 2

    Hero 2

    859
  • Typewriter Text

    Typewriter Text

    810
  • AI Chat Input

    AI Chat Input

    781
  • Full Screen Signup

    Full Screen Signup

    766

More in Buttons

View all
  • Texture Button

    Texture Button

    107
  • Button

    Button

    14
  • Notification Button

    Notification Button

    117
  • HeroUI Button Group

    HeroUI Button Group

    1
  • Base Button

    Base Button

    3
  • Button

    Button

    2
  • Button

    Button

    36
  • App Store Button

    App Store Button

    484