Back to Components
Overlays

Dialog

Accessible modal dialog with overlay and close button.

PropsUsage ExampleVariations

Dependencies

  • clsx
  • tailwind-merge
  • @radix-ui/react-dialog
  • lucide-react

Files

  • components/ui/dialog.tsx

Installation

Using shadcn CLI

npx shadcn add dialog --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge @radix-ui/react-dialog lucide-react

Related Overlays Components