hazeGlass

fun Modifier.hazeGlass(input: HazeInput, style: GlassStyle = GlassStyle, performanceMode: HazePerformanceMode = HazePerformanceMode.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 initializes a fresh snapshot from GlassDefaults, then replays LocalGlassStylestyle 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, performanceMode, 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, this modifier's own content, or an experimental Android window backdrop with a required source fallback.

style

Explicit appearance applied after defaults and LocalGlassStyle.

performanceMode

Effect-owned rendering-fidelity policy for this Glass runtime. The default adaptive policy selects one of Glass's validated performance profiles from retained work and recent update cadence. Named and fixed modes select a normalized, deterministic profile.

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.