Early-bird pricing is open: 50 of 50 licenses still available. See pricing

Skip to content
popcons

Dialog

Modal dialog with focus trap, Escape to close and focus return.

Install this component

Install command hidden until you are signed in with a license.

Live demo

Props

Dialog props
PropTypeDescription
openbooleanControlled open state.
onClose() => voidCalled on Escape, close button or backdrop.
titlestringAccessible name.
descriptionstringOptional description.
dismissOnBackdropbooleandefault trueClose when the backdrop is clicked.

Accessibility

Keyboard

  • EscapeClose
  • Tab / Shift+TabCycle focus inside the dialog

ARIA and semantics

  • role=dialog with aria-modal
  • aria-labelledby and aria-describedby
  • Focus moves in on open and returns to the trigger on close

Source

Copy the files into your project. Or install with the commands above (they unlock with your license).

The full Dialog source is part of the license.

The live demo is free to try. A license unlocks copy-paste source, installs and exports for every component and pack.

Unlock every icon

More from Core components