ui/dialog.tsx

creativetimofficial/ui · apps/www/components/ui/dialog.tsx · typescript · MIT
ui

A set of accessible, styled modal dialog components for building pop-up interfaces and overlays in web applications.

// Source: https://github.com/creativetimofficial/ui | License: MIT | Copyright 2025 [Creative Tim](https://www.creative-tim.com/)
// Provided via justclaw.it.com; keep this notice with the code.
"use client"

import * as React from "react"
import * as DialogPrimitive from "@radix-ui/react-dialog"
import { XIcon } from "lucide-react"

import { cn } from "@/lib/utils"

function Dialog({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
  return <DialogPrimitive.Root data-slot="dialog" {...props} />
}

function DialogTrigger({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
  return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
}

function DialogPortal({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
  return <D

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key