BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/thegridcn/drawer

Drawer

thegridcn/drawer
FreeComponent

thegridcn publishes no description for this item.

See it running

Open the demo on thegridcn

thegridcn.com/r/drawer
Open
This registry sends X-Frame-Options, so its page cannot be embedded here. The link is the same page the frame would have shown.

Install it

npx shadcn@latest add https://thegridcn.com/r/drawer.json

Source

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

What it pulls in

npm packages

  • vaul

Files it writes

  • src/components/ui/drawer.tsx

Facts

Registry
thegridcn
Type
registry:component
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on thegridcn thegridcn.com Raw registry item This item as JSON

More from thegridcn

All 139 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionthegridcnComponentsFree2 deps
Agent Avataragent-avatarthegridcnComponentsFreeno deps
AlertalertthegridcnComponentsFree1 dep
Alert Dialogalert-dialogthegridcnComponentsFree1 dep
Announcement Barannouncement-barthegridcnComponentsFreeno deps
Anomaly Banneranomaly-bannerthegridcnComponentsFreeno deps
Arrival Panelarrival-panelthegridcnComponentsFreeno deps
Aspect Ratioaspect-ratiothegridcnComponentsFree1 dep
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