currentOverlayData

The current OverlayHostData or null if no overlay is currently showing.

val overlayHostData by rememberUpdatedState(overlayHost.currentOverlayData)
Box(modifier) {
content() // The regular content
key(overlayHostData) { overlayHostData?.let { data -> data.overlay.Content(data::finish) } }
}