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.
You can provide a URL for a cover image to display at the top of the Dialog via the coverImage prop. The provided image must be compatible with the CSS background-image “url” function.For best results, the image should be 16:9 aspect ratio with a 1:1 safe area in the centre. To prevent over-cropping the image in this layout, the Dialog is restricted to a maximum height of 60vh.Additionally, in this layout the content on the left is scrollable, while the cover image remains fixed.
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 tailored 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.
Braid components are very explicit about the properties they accept, which makes providing arbitrary data attributes not possible. Instead, a data prop can be provided as a single collection of data attributes.