BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/gmhlab/drawer

drawer

gmhlab/drawer
FreeComponent

gmhlab publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/gmhlab/monorepo/main/packages/ui/public/r/drawer.json

Source

registry/new-york/ui/drawer.tsxraw.githubusercontent.com/gmhlab/monorepo/main/packages/ui/public/r/drawer.json
1import * as React from "react"
2import { Drawer as DrawerPrimitive } from "vaul"
3
4import { cn } from "@/lib/utils"
5
6function Drawer({
7 ...props
8}: React.ComponentProps<typeof DrawerPrimitive.Root>) {
9 return <DrawerPrimitive.Root data-slot="drawer" {...props} />
10}
11
12function DrawerTrigger({
13 ...props
14}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
15 return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
16}
17
18function DrawerPortal({
19 ...props
20}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
21 return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
22}
23
24function DrawerClose({
25 ...props
26}: React.ComponentProps<typeof DrawerPrimitive.Close>) {
27 return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
28}
29
30function DrawerOverlay({
31 className,
32 ...props
33}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
34 return (
35 <DrawerPrimitive.Overlay
36 data-slot="drawer-overlay"
37 className={cn(
38 "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-black/50",
39 className
40 )}
41 {...props}
42 />
43 )
44}
45
46function DrawerContent({
47 className,
48 children,
49 ...props
50}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
51 return (
52 <DrawerPortal data-slot="drawer-portal">
53 <DrawerOverlay />
54 <DrawerPrimitive.Content
55 data-slot="drawer-content"
56 className={cn(
57 "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
58 "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-lg data-[vaul-drawer-direction=top]:border-b",
59 "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-lg data-[vaul-drawer-direction=bottom]:border-t",
60 "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]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
61// … truncated

What it pulls in

npm packages

  • vaul

Files it writes

  • registry/new-york/ui/drawer.tsx

Facts

Registry
gmhlab
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
2 days ago

Go to the source

gwglobalmentalhealth.com gmhlab/monorepo on GitHub Raw registry item This item as JSON

More from gmhlab

All 64 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordiongmhlabComponentsFree2 deps
alertalertgmhlabComponentsFree1 dep
alert-dialogalert-dialoggmhlabComponentsFree1 dep
aspect-ratioaspect-ratiogmhlabComponentsFree1 dep
avataravatargmhlabComponentsFree1 dep
badgebadgegmhlabComponentsFree2 deps
breadcrumbbreadcrumbgmhlabComponentsFree2 deps
buttonbuttongmhlabComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex