BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/drawer

drawer

shadcn/drawer
FreeComponent

shadcn publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by shadcn on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add drawer

Source

ui/drawer.tsxui.shadcn.com/r/styles/new-york/drawer.json
1"use client"
2
3import * as React from "react"
4import { Drawer as DrawerPrimitive } from "vaul"
5
6import { cn } from "@/lib/utils"
7
8const Drawer = ({
9 shouldScaleBackground = true,
10 ...props
11}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
12 <DrawerPrimitive.Root
13 shouldScaleBackground={shouldScaleBackground}
14 {...props}
15 />
16)
17Drawer.displayName = "Drawer"
18
19const DrawerTrigger = DrawerPrimitive.Trigger
20
21const DrawerPortal = DrawerPrimitive.Portal
22
23const DrawerClose = DrawerPrimitive.Close
24
25const DrawerOverlay = React.forwardRef<
26 React.ElementRef<typeof DrawerPrimitive.Overlay>,
27 React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>
28>(({ className, ...props }, ref) => (
29 <DrawerPrimitive.Overlay
30 ref={ref}
31 className={cn("fixed inset-0 z-50 bg-black/80", className)}
32 {...props}
33 />
34))
35DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName
36
37const DrawerContent = React.forwardRef<
38 React.ElementRef<typeof DrawerPrimitive.Content>,
39 React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
40>(({ className, children, ...props }, ref) => (
41 <DrawerPortal>
42 <DrawerOverlay />
43 <DrawerPrimitive.Content
44 ref={ref}
45 className={cn(
46 "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
47 className
48 )}
49 {...props}
50 >
51 <div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
52 {children}
53 </DrawerPrimitive.Content>
54 </DrawerPortal>
55))
56DrawerContent.displayName = "DrawerContent"
57
58const DrawerHeader = ({
59 className,
60 ...props
61}: React.HTMLAttributes<HTMLDivElement>) => (
62 <div
63 className={cn("grid gap-1.5 p-4 text-center sm:text-left", className)}
64 {...props}
65 />
66)
67DrawerHeader.displayName = "DrawerHeader"
68
69const DrawerFooter = ({
70 className,
71 ...props
72}: React.HTMLAttributes<HTMLDivElement>) => (
73 <div
74 className={cn("mt-auto flex flex-col gap-2 p-4", className)}
75 {...props}
76 />
77)
78DrawerFooter.displayName = "DrawerFooter"
79
80const DrawerTitle = React.forwardRef<
81 React.ElementRef<typeof DrawerPrimitive.Title>,
82 React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
83>(({ className, ...props }, ref) => (
84 <DrawerPrimitive.Title
85 ref={ref}
86 className={cn(
87 "text-lg font-semibold leading-none tracking-tight",
88 className
89 )}
90 {...props}
91 />
92))
93DrawerTitle.displayName = DrawerPrimitive.Title.displayName
94
95const DrawerDescription = React.forwardRef<
96// … truncated

What it pulls in

npm packages

  • @base-ui/react

Files it writes

  • ui/drawer.tsx

Facts

Registry
shadcn
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
yesterday

Go to the source

Docs on shadcn ui.shadcn.com shadcn-ui/ui on GitHub Raw registry item This item as JSON

More from shadcn

All 63 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcnComponentsFreeno deps
alertalertshadcnComponentsFreeno deps
alert-dialogalert-dialogshadcnComponentsFreeno deps
aspect-ratioaspect-ratioshadcnComponentsFreeno deps
attachmentattachmentshadcnComponentsFreeno deps
avataravatarshadcnComponentsFreeno deps
badgebadgeshadcnComponentsFreeno deps
breadcrumbbreadcrumbshadcnComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex