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 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 Modifier.placeholder(visible: Boolean, color: Color, shape: Shape = RectangleShape, highlight: PlaceholderHighlight? = null, placeholderFadeTransitionSpec: @Composable Transition.Segment<Boolean>.() -> FiniteAnimationSpec<Float> = { spring() }, contentFadeTransitionSpec: @Composable Transition.Segment<Boolean>.() -> FiniteAnimationSpec<Float> = { spring() }): Modifier

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

Link copied to clipboard
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.