← Back to Wear Material
placeholder
Modifier
in
Wear Material
. Since 1.1.0Overview
Examples
Community Notes
Draws a placeholder shape over the top of a composable and animates a wipe off effect to remove the placeholder. Typically used whilst content is 'loading' and then 'revealed'.
Example of a Chip with icon and a label that put placeholders over individual content slots:
Overloads
placeholder
@Suppress("ComposableModifierFactory")
@ExperimentalWearMaterialApi
@Composable
public fun Modifier.placeholder(
placeholderState: PlaceholderState,
shape: Shape = MaterialTheme.shapes.small,
color: Color =
MaterialTheme.colors.onSurface.copy(alpha = 0.1f)
.compositeOver(MaterialTheme.colors.surface)
)
Parameters
Name | Description |
---|---|
placeholderState | determines whether the placeholder is visible and controls animation effects for the placeholder. |
shape | the shape to apply to the placeholder |
color | the color of the placeholder |
Next ComponentAlert →