PlaceholderDefaults

Contains the default PlaceholderHighlight implementations for common placeholder effects.

These defaults provide pre-configured highlight animations that can be used directly with the placeholder modifier. Each default includes appropriate colors, animation timing, and visual parameters for optimal loading indication.

Example usage:

// Using default shimmer effect
Text(
text = "Loading...",
modifier = Modifier.placeholder(
visible = isLoading,
highlight = PlaceholderDefaults.shimmer
)
)

// Using default fade effect
Image(
painter = placeholderPainter,
contentDescription = null,
modifier = Modifier.placeholder(
visible = isLoading,
highlight = PlaceholderDefaults.fade
)
)

See also

for a sweeping gradient effect

for a simple opacity fade in/out

for a pulsating color overlay

for a liquid flowing light effect

for an expanding circular reveal

Properties

Link copied to clipboard

A circular reveal effect that expands from the center of the placeholder.

Link copied to clipboard
val fade: Fade

A fade effect that smoothly transitions the highlight opacity in and out.

Link copied to clipboard

A light reveal effect that creates a liquid, flowing shimmer.

Link copied to clipboard

A pulse effect that rhythmically brightens and dims the highlight.

Link copied to clipboard

A shimmer effect that sweeps a gradient highlight across the placeholder.