← Back to Wear Material
placeholderShimmer
Modifier
in
Wear Material
. Since 1.1.0Overview
Examples
Community Notes
Modifier to draw a placeholder shimmer over a component. The placeholder shimmer is a 45 degree gradient from Top|Left of the screen to Bottom|Right. The shimmer is coordinated via the animation frame clock which orchestrates the shimmer so that every component will shimmer as the gradient progresses across the screen.
Example of a Chip with icon and a label that put placeholders over individual content slots and then draws a placeholder shimmer over the result:
Overloads
placeholderShimmer
@Suppress("ComposableModifierFactory")
@ExperimentalWearMaterialApi
@OptIn(ExperimentalWearFoundationApi::class)
@Composable
public fun Modifier.placeholderShimmer(
placeholderState: PlaceholderState,
shape: Shape = MaterialTheme.shapes.small,
color: Color = MaterialTheme.colors.onSurface,
)
Parameters
Name | Description |
---|---|
placeholderState | the current placeholder state that determine whether the placeholder shimmer should be shown. |
shape | the shape of the component. |
color | the color to use in the shimmer |
Next ComponentAlert →