---
title: Dialog
description: A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
featured: true
base: base
component: true
links:
doc: https://base-ui.com/react/components/dialog
api: https://base-ui.com/react/components/dialog#api-reference
---
## Installation
Command
Manual
```bash
npx shadcn@latest add dialog
```
Install the following dependencies:
```bash
npm install @base-ui/react
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage
```tsx showLineNumbers
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"
```
```tsx showLineNumbers
```
## Examples
### 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 [Base UI](https://base-ui.com/react/components/dialog#api-reference) documentation for more information.