Package-level declarations

Types

Link copied to clipboard

Contains default values used by Modifier.placeholder and PlaceholderHighlight.

Link copied to clipboard

A class which provides a brush to paint placeholder based on progress.

Functions

Link copied to clipboard
fun PlaceholderDefaults.color(backgroundColor: Color = SparkTheme.colors.surface, contentColor: Color = contentColorFor(backgroundColor), contentAlpha: Float = 0.25f): Color

Returns the value used as the the color parameter value on Modifier.placeholder.

Link copied to clipboard
fun PlaceholderHighlight.Companion.fade(animationSpec: InfiniteRepeatableSpec<Float> = PlaceholderDefaults.fadeAnimationSpec): PlaceholderHighlight

Creates a PlaceholderHighlight which fades in an appropriate color, using the given animationSpec.

fun PlaceholderHighlight.Companion.fade(highlightColor: Color, animationSpec: InfiniteRepeatableSpec<Float> = PlaceholderDefaults.fadeAnimationSpec): PlaceholderHighlight

Creates a Fade brush with the given initial and target colors.

Link copied to clipboard
fun PlaceholderDefaults.fadeHighlightColor(backgroundColor: Color = SparkTheme.colors.surface, alpha: Float = 0.3f): Color

Returns the value used as the the highlightColor parameter value of PlaceholderHighlight.Companion.fade.

Link copied to clipboard

Draws a skeleton UI for illustrations which is typically used whilst a image is 'loading'.

Link copied to clipboard

Draws some skeleton UI which is typically used whilst content is 'loading'.

Link copied to clipboard
fun PlaceholderHighlight.Companion.shimmer(animationSpec: InfiniteRepeatableSpec<Float> = PlaceholderDefaults.shimmerAnimationSpec, @FloatRange(from = 0.0, to = 1.0) progressForMaxAlpha: Float = 0.6f): PlaceholderHighlight

Creates a PlaceholderHighlight which 'shimmers', using a default color.

fun PlaceholderHighlight.Companion.shimmer(highlightColor: Color, animationSpec: InfiniteRepeatableSpec<Float> = PlaceholderDefaults.shimmerAnimationSpec, @FloatRange(from = 0.0, to = 1.0) progressForMaxAlpha: Float = 0.6f): PlaceholderHighlight

Creates a PlaceholderHighlight which 'shimmers', using the given highlightColor.

Link copied to clipboard
fun PlaceholderDefaults.shimmerHighlightColor(backgroundColor: Color = SparkTheme.colors.surface, alpha: Float = 0.3f): Color

Returns the value used as the the highlightColor parameter value of PlaceholderHighlight.Companion.shimmer.

Link copied to clipboard

Draws some skeleton UI which is typically used whilst content is 'loading'.