currentWindowContainerSize

A Composable function that returns the current window size and automatically triggers recomposition when the window is resized, enabling responsive layouts.

Return Type Description
DpSize The current window container size with width and height properties in Dp units

Code Examples

Basic Example

Use currentWindowContainerSize() to get the current window dimensions:

HINT: Resize your browser's width to see the size changing.
import com.composeunstyled.currentWindowContainerSize
val containerSize = currentWindowContainerSize()