For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/dialog.md.

Dialog

A panel the reader has to resolve before carrying on — reach for Drawer when they should be able to keep it open and keep working, and Popover when the content is a detail rather than a task. It is Drawer with kind='dialog', which shares the panel but keeps the two families' nesting separate: a dialog only steps back for another dialog.

Source · Storybook

Usage

import { Button } from '@wallarm-org/design-system/Button';
import { Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '@wallarm-org/design-system/Dialog';

Examples

DialogFooter holds the decision. Put the confirming action last, since that is where the eye finishes.

With description

DialogDescription states the consequence, which is what turns a confirmation from a speed bump into a decision. DialogHeader finds the title and description among its children and stacks them, so the close button stays right-aligned however many it gets.

A left-aligned action for the escape route — cancel, learn more — kept away from the confirming pair on the right.

Sizes

The standard widths. Pick by the content, not the importance: a wide dialog for a short question reads as a mistake.

Custom sizes

Explicit width, minWidth and maxWidth for content the standard steps do not fit.

Scrollable

The body scrolls while header and footer stay put, so the decision never scrolls out of reach.

With input at edge

A field against the panel edge, which is where focus rings and shadows get clipped if the padding is wrong.

With input at edge scrollable

The same, with scrolling — the case where a focus ring can be cut by the scroll container rather than the panel.

With nested drawer

A drawer opened from a dialog. Different families, so neither pushes the other back; they stack.

With nested select

A Select inside a dialog, checking that its menu escapes the panel rather than being clipped by it.

With nested calendar

A Calendar inside a dialog, the same check for a popover that is taller than the panel.

Controlled

Owning open, which is what you need when something outside the dialog decides it should close.

No closable on esc

Escape disabled, for a decision that must not be dismissed by reflex. Use it sparingly — it takes away the exit readers expect.

No overlay

Without the backdrop. The panel stops reading as blocking, which is usually the wrong signal for a dialog.

With nested

A dialog inside a dialog: the outer one steps back so the depth is visible. Two is the most a reader can follow.

With tabs

Tabs inside a dialog, for a task with a couple of facets — not as a way to fit a whole form into one panel.

Props

PropTypeDefaultDescription
kindDrawerKind | undefinedWhich overlay family this root belongs to. Drives the same-kind nesting counter behind the pushed-back animation: a Drawer only pushes back for a nested Drawer, a Dialog only for a nested Dialog. Set to 'dialog' by the Dialog component — consumers should not need to touch this.
openboolean | undefinedControlled open state
onOpenChange((open: boolean) => void) | undefinedControlled open change handler
closeOnEscapeboolean | undefinedWhether ESC key closes the drawer (default: true)
closeOnOutsideClickboolean | undefinedWhether clicking outside closes the drawer (default: true)
overlayboolean | undefinedOverlay visibility (default: true)
modalboolean | undefinedWhether the drawer is modal — blocks interaction with the rest of the page (default: true)
widthstring | number | undefinedDIALOG_SIZES.mediumWidth - number for pixels, string for percentage (e.g., "50%")
minWidthnumber | undefinedDIALOG_WIDTH_CONSTRAINTS.minMinimum width in pixels
maxWidthnumber | undefinedDIALOG_WIDTH_CONSTRAINTS.maxMaximum width in pixels
onInteractOutsidecomplexFired when the user interacts outside the drawer (e.g. clicks the backdrop).
onEscapeKeyDown((event: KeyboardEvent) => void) | undefinedFired when the user presses the Escape key while the drawer is open.
data-testidstring | undefined

Explorer