Drawer
neobrutalism-components/drawerFreeComponent
Neobrutalism Components publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by Neobrutalism Components on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.neobrutalism.dev/r/drawer.jsonSource
1"use client"23import { Drawer as DrawerPrimitive } from "vaul"45import * as React from "react"67import { cn } from "@/lib/utils"89function Drawer({10 shouldScaleBackground = true,11 ...props12}: React.ComponentProps<typeof DrawerPrimitive.Root>) {13 return (14 <DrawerPrimitive.Root15 data-slot="drawer"16 shouldScaleBackground={shouldScaleBackground}17 {...props}18 />19 )20}2122function DrawerTrigger({23 ...props24}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {25 return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />26}2728function DrawerPortal({29 ...props30}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {31 return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />32}3334function DrawerClose({35 ...props36}: React.ComponentProps<typeof DrawerPrimitive.Close>) {37 return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />38}3940function DrawerOverlay({41 className,42 ...props43}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {44 return (45 <DrawerPrimitive.Overlay46 data-slot="drawer-overlay"47 className={cn(48 "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-overlay",49 className,50 )}51 {...props}52 />53 )54}5556function DrawerContent({57 className,58 children,59 ...props60}: React.ComponentProps<typeof DrawerPrimitive.Content>) {61 return (62 <DrawerPortal>63 <DrawerOverlay />64 <DrawerPrimitive.Content65 data-slot="drawer-content"66 className={cn(67 "bg-background group/drawer-content fixed z-50 flex h-auto flex-col",68 "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-base border-t-2 border-t-border",69 "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-base border-b-2 border-b-border",70 "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:sm:max-w-sm border-r-2 border-r-border",71// … truncated
What it pulls in
npm packages
Files it writes
More from Neobrutalism Components
All 92 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | Neobrutalism Components | Components | Free | 1 dep | |
| Alertalert | Neobrutalism Components | Components | Free | no deps | |
| Alert dialogalert-dialog | Neobrutalism Components | Components | Free | 1 dep | |
| Avataravatar | Neobrutalism Components | Components | Free | 1 dep | |
| Badgebadge | Neobrutalism Components | Components | Free | no deps | |
| Breadcrumbbreadcrumb | Neobrutalism Components | Components | Free | 1 dep | |
| Buttonbutton | Neobrutalism Components | Components | Free | 1 dep | |
| Calendarcalendar | Neobrutalism Components | Components | Free | 2 deps |
