hazeGlass

fun Modifier.hazeGlass(input: HazeInput, style: GlassStyle = GlassStyle, sampling: HazeSampling = HazeSampling.Default, expandLayerBounds: Boolean = true, interactionSource: InteractionSource? = null, interactionTransformTarget: GlassTransformTarget = GlassTransformTarget.MaterialOnly, interactionTransformPivot: GlassTransformPivot = GlassTransformPivot.Pointer, interactionReducedMotionPolicy: GlassReducedMotionPolicy = GlassReducedMotionPolicy.System): Modifier

Draws a Glass material using an explicit Haze input.

style is an immutable sequence of appearance writes recorded when its builder executes. Haze replays GlassDefaults.styleLocalGlassStylestyle into a fresh snapshot owned by this modifier node without invoking any Style builder. The same Style may therefore be shared by concurrent nodes. Each node independently owns and animates the recorded hover, focus, and press responses.

Values captured by a previously constructed Style do not update when they are mutated. To update appearance, construct and supply a replacement Style through recomposition.

input, sampling, expandLayerBounds, interactionSource, interactionTransformTarget, interactionTransformPivot, and interactionReducedMotionPolicy are node-owned modifier mechanics rather than Style presentation. Recomposition replaces each value completely, including a null interaction source.

Parameters

input

Source-backed content or this modifier's own content.

style

Explicit appearance applied after defaults and LocalGlassStyle.

sampling

Input sampling policy. HazeSampling.Default currently points to HazeSampling.Adaptive, which selects approximately 50% or 25% of full-resolution input pixels from retained-layer work and recent update cadence. HazeSampling.Fixed owns validation of its finite 0f < pixelFraction <= 1f value; Glass does not add another sampling contract.

expandLayerBounds

Whether Glass may expand its capture layer for optical sampling.

interactionSource

Optional external interaction source owned by this modifier node.

interactionTransformTarget

Visual layers that receive the interaction scale transform.

interactionTransformPivot

Pivot used by the interaction scale transform.

interactionReducedMotionPolicy

Motion policy for this node's Style responses.