BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/ui/dialog

dialog

draco-china-github/dialog
FreeComponent

shadcn/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/dialog.json

Source

registry/radix-sera/ui/dialog.tsxraw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/dialog.json
1"use client"
2
3import * as React from "react"
4import { Dialog as DialogPrimitive } from "radix-ui"
5
6import { cn } from "@/registry/radix-sera/lib/utils"
7import { Button } from "@/registry/radix-sera/ui/button"
8import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
9
10function Dialog({
11 ...props
12}: React.ComponentProps<typeof DialogPrimitive.Root>) {
13 return <DialogPrimitive.Root data-slot="dialog" {...props} />
14}
15
16function DialogTrigger({
17 ...props
18}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
19 return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
20}
21
22function DialogPortal({
23 ...props
24}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
25 return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
26}
27
28function DialogClose({
29 ...props
30}: React.ComponentProps<typeof DialogPrimitive.Close>) {
31 return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
32}
33
34function DialogOverlay({
35 className,
36 ...props
37}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
38 return (
39 <DialogPrimitive.Overlay
40 data-slot="dialog-overlay"
41 className={cn(
42 "fixed inset-0 isolate z-50 bg-black/20 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
43 className
44 )}
45 {...props}
46 />
47 )
48}
49
50function DialogContent({
51 className,
52 children,
53 showCloseButton = true,
54 ...props
55}: React.ComponentProps<typeof DialogPrimitive.Content> & {
56 showCloseButton?: boolean
57}) {
58 return (
59 <DialogPortal>
60 <DialogOverlay />
61 <DialogPrimitive.Content
62 data-slot="dialog-content"
63 className={cn(
64 "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-none bg-popover p-6 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
65 className
66 )}
67 {...props}
68 >
69 {children}
70 {showCloseButton && (
71 <DialogPrimitive.Close data-slot="dialog-close" asChild>
72 <Button
73 variant="ghost"
74 className="absolute top-5 right-5 bg-secondary"
75 size="icon-sm"
76 >
77 <IconPlaceholder
78 lucide="XIcon"
79// … truncated

What it pulls in

Other registry items

  • button

Files it writes

  • registry/radix-sera/ui/dialog.tsx

Facts

Registry
shadcn/ui
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-04
Last confirmed
today

Go to the source

draco-china.github.io draco-china/shadcn-pro on GitHub Raw registry item This item as JSON

More from shadcn/ui

All 201 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcn/uiComponentsFreeno deps
alertalertshadcn/uiComponentsFreeno deps
alert-dialogalert-dialogshadcn/uiComponentsFreeno deps
aspect-ratioaspect-ratioshadcn/uiComponentsFreeno deps
avataravatarshadcn/uiComponentsFreeno deps
badgebadgeshadcn/uiComponentsFreeno deps
breadcrumbbreadcrumbshadcn/uiComponentsFreeno deps
buttonbuttonshadcn/uiComponentsFreeno 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