Function

alpha

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

alpha

Source set: 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.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: