2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Components

Dialog

Updated: July 27, 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. A simple dialog with a title, description, and content. Add a footer section to contain action buttons. 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. Dialogs can be customized with Flex props for different visual styles. Remove the header and use full-bleed media with flush. Use hideClose to remove the close button and maxWidth to control the size. By default, clicking the backdrop closes the dialog. Set closeOnClickaway={false} to require an explicit close action. 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
Prop
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
hideClose
Remove the close button, when only an action should dismiss it.
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
Wrap your application (or a subtree) when using stacked dialogs.
Prop
Type
Default
children
React.ReactNode
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club