Deferred

@Composable
fun Deferred(content: @Composable () -> Unit)(source)

Defer the target content from rendering until the main content is finished.

This has the (often wanted) side effects of making sure the content always appears on top of the main content (without needing to use z-index tricks) while also de-parenting the target being rendered (thereby avoiding inheriting unexpected styles from element you want to appear beside, not within).

Render deferral is particularly useful for overlays, like modals and tooltips.