Skip to Content

Modal

An overlay element that displays its child on top of a full-screen backdrop. Visibility is controlled by the caller mounting or unmounting this element. Maps to a UIToolkit VisualElement with absolute positioning.

Constructor

Creates an Modal element.

ParameterDescription
childThe content element displayed inside the modal. Must not be null.
onDismissCallback invoked when dismissal is requested.
barrierDismissibleWhether tapping the backdrop triggers . Defaults to true.
keyAn optional key for reconciliation identity.

Properties

BarrierDismissible

When true, tapping the backdrop dismisses the modal by invoking OnDismiss. Defaults to true.

OnDismiss

Callback invoked when the user requests dismissal of the modal, either by tapping the backdrop (when BarrierDismissible is true) or through any other dismiss gesture.

Last updated on