Skip to content
TrademarkTrademark
Docs
Components

Dialog

Updated: October 11, 2026
View on GitHub

Dialogs are overlay windows that focus user attention on important information, collect input, or require decisions. They appear above the main content and block interaction with the rest of the page until dismissed.

Basic usage

A simple dialog with a title, description, and content.

Add a footer section to contain action buttons.

Stacked dialogs

Dialogs can be stacked on top of each other for multi-step interactions. Wrap your app (or the dialog subtree) in DialogProvider so stacked dialogs can coordinate focus and inert behavior on the base dialog.

Customized dialog

Dialogs can be customized with Flex props for different visual styles.

Flush

Remove the header and use full-bleed media with flush. Use showClose={false} to remove the close button and maxWidth to control the size.

Close on clickaway

By default, clicking the backdrop closes the dialog. Set closeOnClickaway={false} to require an explicit close action.

Accessibility

The Dialog component follows accessibility best practices:

  • Uses role="dialog" and aria-modal="true"
  • Traps focus within the dialog when open
  • Supports keyboard navigation and Escape key to close
  • Provides proper labeling with aria-labelledby
  • Makes content outside the dialog inert when dialog is open

API reference

Type
Default
openrequired
Whether it is showing.
boolean—
onCloserequired
Called on the close button, Escape, or a click outside.
() => void—
titlerequired
Heading. Required — a dialog with no title is hard to place.
ReactNodestring
—
description
Supporting line under the title.
ReactNode—
children
React.ReactNode—
footer
Pinned below the body, for the actions.
ReactNode—
base
Marks the dialog underneath a stack, which then ignores Escape and click-away while the one above it is open.
boolean—
stack
Marks this as a dialog opened on top of another one.
boolean—
flush
Drop the padding and the top radius, for content that should meet the edges.
booleanfalse
showClose
Show the close button. Turn it off when only an action should dismiss the dialog.
boolean!hideClose
hideClose
Deprecated: use showClose={false}. Still works through 2.x; showClose wins when both are set.
booleanfalse
onHeightChange
Called when the body resizes — useful for animating a stack.
(height: number) => void—
minHeight
Lower bound on the body height, in rem.
number—
closeOnClickaway
Close on a click outside.
booleantrue
…and every FlexProps propinherited—

DialogProvider

Wrap your application (or a subtree) when using stacked dialogs.

Type
Default
childrenrequired
React.ReactNode—
Edit this page on GitHub