BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/gmhlab/dialog

dialog

gmhlab/dialog
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/dialog.json

Source

registry/new-york/ui/dialog.tsxraw.githubusercontent.com/gmhlab/monorepo/main/packages/ui/public/r/dialog.json
1import * as React from "react"
2import { XIcon } from "lucide-react"
3import { Dialog as DialogPrimitive } from "radix-ui"
4
5import { cn } from "@/lib/utils"
6import { Button } from "@/components/ui/button"
7
8function Dialog({
9 ...props
10}: React.ComponentProps<typeof DialogPrimitive.Root>) {
11 return <DialogPrimitive.Root data-slot="dialog" {...props} />
12}
13
14function DialogTrigger({
15 ...props
16}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
17 return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
18}
19
20function DialogPortal({
21 ...props
22}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
23 return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
24}
25
26function DialogClose({
27 ...props
28}: React.ComponentProps<typeof DialogPrimitive.Close>) {
29 return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
30}
31
32function DialogOverlay({
33 className,
34 ...props
35}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
36 return (
37 <DialogPrimitive.Overlay
38 data-slot="dialog-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 DialogContent({
49 className,
50 children,
51 showCloseButton = true,
52 ...props
53}: React.ComponentProps<typeof DialogPrimitive.Content> & {
54 showCloseButton?: boolean
55}) {
56 return (
57 <DialogPortal data-slot="dialog-portal">
58 <DialogOverlay />
59 <DialogPrimitive.Content
60 data-slot="dialog-content"
61 className={cn(
62 "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",
63 className
64 )}
65 {...props}
66 >
67 {children}
68 {showCloseButton && (
69 <DialogPrimitive.Close
70 data-slot="dialog-close"
71// … truncated

What it pulls in

npm packages

  • lucide-react
  • radix-ui

Other registry items

  • button

Files it writes

  • registry/new-york/ui/dialog.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