modal

fun modal(id: String? = null, initialize: Modal.() -> Unit)

Factory function to create a Modal.

API-Sketch:

modal() {
var restoreFocus: Boolean
var setInitialFocus: Boolean
// inherited by `OpenClose`
val openState: DatabindingProperty<Boolean>
val opened: Flow<Boolean>
val close: SimpleHandler<Unit>
val open: SimpleHandler<Unit>
val toggle: SimpleHandler<Unit>

modalPanel() {
modalOverlay() { }
modalTitle() { }
modalDescription() { } // use multiple times

// setInitialFocus() within one tag is possible
}
}

For more information refer to the official documentation