Material3

fun HazeBlurStyle.Companion.Material3(containerColor: Color = MaterialTheme.colorScheme.surface): HazeBlurStyle

Creates a Blur Style with a Material 3 surface background.

The default containerColor comes from the current MaterialTheme. The returned Style is reused while that color is unchanged.


fun HazeBlurStyle.Companion.Material3(containerColor: Color = MaterialTheme.colorScheme.surface, block: HazeBlurStyleScope.() -> Unit): HazeBlurStyle

Creates a Blur Style with a Material 3 surface background and additional Style writes.

The default containerColor comes from the current MaterialTheme. The supplied color is recorded before block, so the block can override it without changing unrelated inherited Style writes.

The returned Style compares by value: two Styles are equal when they have the same containerColor and the same block instance. It is therefore equal across recompositions only while the caller's block is the same instance. Strong skipping memoizes a lambda created in a composable, so the Style stays equal unless a captured value changes. A lambda recreated on every composition yields an unequal Style; remember the Style or hoist the lambda in that case.