Package-level declarations

Functions

Link copied to clipboard
fun PlaceholderDefaults.color(backgroundColor: Color = MaterialTheme.colors.surface, contentColor: Color = contentColorFor(backgroundColor), contentAlpha: Float = 0.1f): 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.

Link copied to clipboard
fun PlaceholderDefaults.fadeHighlightColor(backgroundColor: Color = MaterialTheme.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
fun Modifier.placeholder(visible: Boolean, color: Color = Color.Unspecified, shape: Shape? = null, 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(animationSpec: InfiniteRepeatableSpec<Float> = PlaceholderDefaults.shimmerAnimationSpec, progressForMaxAlpha: Float = 0.6f): PlaceholderHighlight

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

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

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