hazeEffect

fun Modifier.hazeEffect(state: HazeState?, style: HazeStyle = HazeStyle.Unspecified, block: HazeEffectScope.() -> Unit? = null): Modifier

Draw the 'haze' effect behind the attached node.

This version of the modifier is the primary entry for 'background blurring', where the modifier node will read the attached HazeAreas in the given state, and then draw those (blurred) as a background. This layout's content will be drawn on top.

Parameters

state

The HazeState to observe for background content.

style

The HazeStyle to use on this content. Any specified values in the given style will override that value from the default style, provided to hazeSource.

block

block on HazeChildScope where you define the styling and visual properties.


fun Modifier.hazeEffect(style: HazeStyle = HazeStyle.Unspecified, block: HazeEffectScope.() -> Unit? = null): Modifier

Draw the 'haze' effect, using this node's content as the source.

This version of the modifier is the entry point for 'content blurring', where the modifier node will blurred any content drawn into this layout node. It is similar to the Modifier.blur modifier available in Compose Foundation, but you get all of the styling and features which provides on top.

Parameters

style

The HazeStyle to use on this content. Any specified values in the given style will override that value from the default style, provided to hazeSource.

block

block on HazeChildScope where you define the styling and visual properties.