Package-level declarations

Types

Link copied to clipboard

Controls the quality and appearance of chromatic aberration (color dispersion) at the refraction edges.

Link copied to clipboard
data class GlassAccessibilitySettings(val reduceTransparency: Boolean = false, val increaseContrast: Boolean = false, val showBorders: Boolean = false)

Semantic accessibility preferences that change how Glass separates itself from its content.

Link copied to clipboard

Default values used by hazeGlass and GlassStyle resolution.

Link copied to clipboard
sealed interface GlassInteractionScope

Declares the visual response for one Glass interaction state.

Link copied to clipboard
data class GlassOptics(val refractionStrength: Float = 0.7f, val refractionHeightFraction: Float = 0.25f, val refractionDisplacement: Dp = 15.dp, val depth: OpticalSizeValue<Float> = OpticalSizeValue.Fixed(1f), val blurRadius: OpticalSizeValue<Dp> = OpticalSizeValue.Fixed(14.dp), val progressive: HazeProgressive? = null, val refractionFoldStrength: Float = 0.0f, val refractionDetailIntensity: Float = 0.76f)

The optical response used to render a Glass material.

Link copied to clipboard

Controls whether interaction motion is reduced.

Link copied to clipboard
sealed interface GlassStyle

An opaque, immutable sequence of recorded Glass appearance writes.

Link copied to clipboard
annotation class GlassStyleDsl

Marks the nested receiver scopes used while constructing a GlassStyle.

Link copied to clipboard

Receiver for Glass appearance property writes.

Link copied to clipboard

Selects the pivot used by the interaction scale transform.

Link copied to clipboard

Selects which visual layers receive the interaction scale transform.

Link copied to clipboard
data class OpticalSizePoint<T>(val shortestDimension: Dp, val value: T)

Associates a value with a positive shortest dimension.

Link copied to clipboard
sealed interface OpticalSizeValue<T>

An optical parameter value that is either fixed or responsive to a material's shortest dimension.

Link copied to clipboard

Describes the cross-sectional surface shape of the Glass bezel.

Properties

Link copied to clipboard

Accessibility preferences inherited by Glass nodes in this composition subtree.

Link copied to clipboard

A ProvidableCompositionLocal which provides inherited Glass appearance.

Functions

Link copied to clipboard

Creates a recorded, replayable GlassStyle.

Link copied to clipboard
fun Modifier.hazeGlass(input: HazeInput, style: GlassStyle = GlassStyle, performanceMode: HazePerformanceMode? = null, 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.