BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/obsidianui/drawer

drawer

obsidianui/drawer
FreeComponent

obsidianui publishes no description for this item.

Live preview

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

Install it

npx shadcn@latest add https://obsidianui.dev/r/drawer.json

Source

components/ui/drawer.tsxobsidianui.dev/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

  • public/r/drawer.json

Facts

Registry
obsidianui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-01
Last confirmed
3 days ago

Go to the source

Docs on obsidianui obsidianui.dev Atharvsinh-codez/ObsidianUI on GitHub Raw registry item This item as JSON

More from obsidianui

All 111 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
ai-inputai-inputobsidianuiComponentsFree2 deps
alertalertobsidianuiComponentsFreeno deps
animated-tab-baranimated-tab-barobsidianuiComponentsFreeno deps
apple-spotlightapple-spotlightobsidianuiComponentsFree2 deps
avataravatarobsidianuiComponentsFree1 dep
badgebadgeobsidianuiComponentsFree1 dep
breadcrumbbreadcrumbobsidianuiComponentsFree2 deps
buttonbuttonobsidianuiComponentsFree1 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