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
Modal
Creates an Modal element.
| Parameter | Description |
|---|---|
child | The content element displayed inside the modal. Must not be null. |
onDismiss | Callback invoked when dismissal is requested. |
barrierDismissible | Whether tapping the backdrop triggers . Defaults to true. |
key | An 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