Placeholder Highlight
interface PlaceholderHighlight
Defines the visual highlight animation applied to a placeholder.
A placeholder highlight provides animated visual effects that appear on top of placeholder content to indicate loading state. Common implementations include Shimmer, Fade, Pulse, CircularReveal, and LightReveal.
Implementations should define:
How the highlight is drawn via brush
The opacity of the highlight via alpha
The animation timing via animationSpec
Example usage:
Box(
modifier = Modifier
.size(200.dp, 50.dp)
.placeholder(
visible = isLoading,
highlight = PlaceholderDefaults.shimmer
)
)Content copied to clipboard
See also
for default highlight implementations