Package-level declarations

Types

Link copied to clipboard
sealed class State<out T>

A generic sealed class that represents the different states of an asynchronous operation or data loading process. It is particularly useful for managing UI state in Jetpack Compose, allowing for exhaustive handling of all possible outcomes.

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Extension function for Modifier that detects tap gestures and calculates the tap's origin as a TransformOrigin, which represents the position as a fraction of the size of the element.

Link copied to clipboard
fun Modifier.fadeOut(initialColor: Color = Color.Transparent, fadeToColor: Color = Color.White, verticalFade: Boolean = true): Modifier

Applies a fade effect over the content, drawing a gradient from an initial color to a final color. This can be used to create effects like text fading into the background.

Link copied to clipboard

Context extension function

Link copied to clipboard
fun Modifier.glow(glowingColor: Color, containerColor: Color = Color.White, cornerRadius: Dp = 0.dp, glowingRadius: Dp = 20.dp, glowAlpha: Float = 0.8f, offsetX: Dp = 0.dp, offsetY: Dp = 0.dp): Modifier

Applies a glowing effect around the composable.

Link copied to clipboard
fun Modifier.iif(condition: Boolean, then: Modifier.() -> Modifier): Modifier

Applies the given Modifier if the condition is true.

Link copied to clipboard
fun Modifier.innerShadow(shape: Shape, color: Color = Color.Black, blur: Dp = 4.dp, offsetY: Dp = 2.dp, offsetX: Dp = 2.dp, spread: Dp = 0.dp): Modifier

Adds an inner shadow effect to the content.

Link copied to clipboard
fun Modifier.parallaxLayout(scrollState: ScrollState, rate: Int): Modifier

Creates a parallax effect on a composable as the user scrolls. The composable's vertical position is adjusted based on the scrollState.

Link copied to clipboard
fun Modifier.shadow(color: Color = Color.Black, offsetX: Dp = 0.dp, offsetY: Dp = 0.dp, blurRadius: Dp = 0.dp): Modifier

Draws a shadow behind the content.

fun Modifier.shadow(spread: Dp = 8.dp, @FloatRange(from = 0.0, to = 1.0) alpha: Float = 0.25f, color: Color = Color.Gray, radius: Dp = 8.dp): Modifier

A workaround for custom colored shadow.

Link copied to clipboard

Applies a shimmering effect to the composable. This is often used to indicate a loading state. The shimmer is a linear gradient that animates across the composable.

fun Modifier.shimmerEffect(baseColor: Color = Color.LightGray): Modifier

Applies a shimmering effect to a composable, typically used for loading placeholders.

Link copied to clipboard

Context extension function

Link copied to clipboard
fun Modifier.thenIf(predicate: Boolean, modify: () -> Modifier): Modifier

Applies a Modifier if the given predicate is true.