Function

alpha

Sets the opacity of this element (and its children) to a value between [0..1].

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

alpha

Android
public fun SubspaceModifier.alpha(
    @FloatRange(from = 0.0, to = 1.0) alpha: Float
): SubspaceModifier

Sets the opacity of this element (and its children) to a value between [0..1]. An alpha value of 0.0f means fully transparent while a value of 1.0f is completely opaque. Elements with semi-transparent alpha values (> 0.0 but < 1.0f) will be rendered using alpha-blending.

Parameters

alpha the opacity of this element (and its children). Must be a value between 0 and 1, inclusive. Values < 0 or > 1 will be clamped.