LightReveal

data class LightReveal(highlightColor: Color, val animationSpec: InfiniteRepeatableSpec<Float>) : PlaceholderHighlight

A PlaceholderHighlight that draws a liquid, flowing shimmer effect.

This effect simulates a wavy, distorted band of light moving across the placeholder, giving it an organic and high-quality feel. It is achieved by composing multiple animated gradients.

Parameters

highlightColor

The primary color of the liquid shimmer.

animationSpec

The specification for the animation.

Constructors

Link copied to clipboard
constructor(highlightColor: Color, animationSpec: InfiniteRepeatableSpec<Float>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun alpha(@FloatRange(from = 0.0, to = 1.0) progress: Float): Float

Returns the alpha (opacity) of the highlight at the current animation progress.

Link copied to clipboard
open override fun brush(@FloatRange(from = 0.0, to = 1.0) progress: Float, size: Size): Brush

Returns the brush to draw the highlight at the current animation progress.