<div class='type'>Composable Function</div>


<a id='references'></a>



<h2 id="placeholder-placeholderstate-shape-color">placeholder</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
@Composable
public fun Modifier.placeholder(
    placeholderState: PlaceholderState,
    shape: Shape = PlaceholderDefaults.shape,
    color: Color = PlaceholderDefaults.color,
): Modifier
```


Modifier.placeholder draws a skeleton shape over a component, for situations when no provisional
content (such as cached data) is available. The placeholder skeleton can be displayed instead,
while the content is loading. The reveal of the content will be animated when it becomes
available (and hidden again if the content becomes unavailable), unless the ReducedMotion setting
is enabled, in which case those are instantaneous. NOTE: For animations to work, an `AppScaffold`
should be used.


If there is some cached data for this field, it may be better to show that while loading, see


Note that the component should still be sized close to the target, so the final reveal of the
content is less disruptive.

#### Parameters

| | |
| --- | --- |
| placeholderState | the state used to coordinate several placeholder effects. |
| shape | the shape of the placeholder. |
| color | the color to use in the placeholder. |