---
title: Dialog
description: A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
featured: true
base: aria
component: true
links:
doc: https://react-aria.adobe.com/Modal
api: https://react-aria.adobe.com/Modal#api
---
## Installation
CommandManual
```bash
npx shadcn@latest add dialog
```
Install the following dependencies:
```bash
npm install react-aria-components
```
Copy and paste the following code into your project.Update the import paths to match your project setup.
## Usage
```tsx showLineNumbers
import { Button } from "@/components/ui/button"
import {
Dialog,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"
```
```tsx showLineNumbers
```
## Composition
Use the following composition to build a `Dialog`:
```text
DialogTrigger
├── Button
└── Dialog
├── DialogHeader
│ ├── DialogTitle
│ └── DialogDescription
└── DialogFooter
```
## Custom Close Button
Replace the default close control with your own button.
## No Close Button
Use `showCloseButton={false}` to hide the close button.
## Sticky Footer
Keep actions visible while the content scrolls.
## Scrollable Content
Long content can scroll while the header stays in view.
## RTL
To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl).
## API Reference
See the [React Aria](https://react-aria.adobe.com/Modal#api) documentation for more information.