Docs
Dialog

Dialog

A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.

Loading...
Loading...

Installation

npx shadcn-ng@latest add dialog
npm
yarn
pnpm
bun

Install the following dependencies:

npm install @radix-ng/primitives @ng-icons/core @ng-icons/lucide
npm
yarn
pnpm
bun

Copy and paste the following code into your project.

Update the import paths to match your project setup.

Usage

import {
  UbDialogContentDirective,
  UbDialogDescriptionDirective,
  UbDialogFooterDirective,
  UbDialogHeaderDirective,
  UbDialogTitleDirective,
  UbDialogTriggerDirective,
} from '@/components/ui/dialog'
<button ubButton variant="outline" [ubDialogTrigger]="dialog">Open</button>
 
<ng-template #dialog>
  <div ubDialogContent>
    <div ubDialogHeader>
      <h2 ubDialogTitle>Are you absolutely sure?</h2>
      <p ubDialogDescription>
        This action cannot be undone. This will permanently delete your account and remove your data from our servers.
      </p>
    </div>
  </div>
</ng-template>