---
title: Dialog
description: A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
featured: true
component: true
radix:
link: https://www.radix-ui.com/docs/primitives/components/dialog
api: https://www.radix-ui.com/docs/primitives/components/dialog#api-reference
---
## Installation
```bash
npx shadcn-ui add dialog
```
Manual Installation
1. Install the `@radix-ui/react-dialog` component from radix-ui:
```bash
npm install @radix-ui/react-dialog
```
2. Copy and paste the following code into your project.
This is the `` primitive. You can place it in a file at `components/ui/dialog.tsx`.
## Usage
```tsx
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"
```
```tsx
```
## Notes
To activate the `Dialog` component from within a `Context Menu` or `Dropdown Menu`, you must encase the `Context Menu` or
`Dropdown Menu` component in the `Dialog` component. For more information, refer to the linked issue [here](https://github.com/radix-ui/primitives/issues/1836).
```tsx {14-25}
```