The title prop provides an accessible name announced to the user when the Dialog is opened. Optionally, a description can be provided and will be announced by a screen reader as well as visually forming part of the header block.
Open in Playroom and enable your screen reader to preview the announcements.
Recommended for prompting the user to make a decision or confirm an action. For more detailed content or user input (e.g. forms), consider using a Drawer instead.
The presentation of a Dialog should always be directly connected to a user action, such as a button click. Opening on page load should be avoided.
The onClose function is called when the user either click the close button inside the Dialog, or clicks on the backdrop outside the Dialog. The aria-label for the close button can be customised by providing a closeLabel prop.
If the contents are unable to fit on the screen, dialogs become scrollable with a fixed close button.If you need to display a large amount of content, consider using a Drawer instead.