dialog
agentmesh/dialogFreeComponent
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/dialog.jsonSource
1"use client"23import * as React from "react"4import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"56import { cn } from "@/registry/base-vega/lib/utils"7import { Button } from "@/registry/base-vega/ui/button"8import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"910function Dialog({ ...props }: DialogPrimitive.Root.Props) {11 return <DialogPrimitive.Root data-slot="dialog" {...props} />12}1314function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {15 return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />16}1718function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {19 return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />20}2122function DialogClose({ ...props }: DialogPrimitive.Close.Props) {23 return <DialogPrimitive.Close data-slot="dialog-close" {...props} />24}2526function DialogOverlay({27 className,28 ...props29}: DialogPrimitive.Backdrop.Props) {30 return (31 <DialogPrimitive.Backdrop32 data-slot="dialog-overlay"33 className={cn(34 "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",35 className36 )}37 {...props}38 />39 )40}4142function DialogContent({43 className,44 children,45 showCloseButton = true,46 ...props47}: DialogPrimitive.Popup.Props & {48 showCloseButton?: boolean49}) {50 return (51 <DialogPortal>52 <DialogOverlay />53 <DialogPrimitive.Popup54 data-slot="dialog-content"55 className={cn(56 "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-xl bg-popover p-6 text-sm text-popover-foreground 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",57 className58 )}59 {...props}60 >61 {children}62 {showCloseButton && (63 <DialogPrimitive.Close64 data-slot="dialog-close"65 render={66 <Button67 variant="ghost"68 className="absolute top-4 right-4"69 size="icon-sm"70 />71 }72 >73 <IconPlaceholder74 lucide="XIcon"75 tabler="IconX"76 hugeicons="Cancel01Icon"77 phosphor="XIcon"78// … truncated
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps |
