# rememberPlaceholderState

## Functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/PlaceholderState` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/rememberPlaceholderState.composable#rememberPlaceholderState(kotlin.Boolean)(isVisible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/PlaceholderState` that is remembered across compositions. |

## Functions

### rememberPlaceholderState

Artifact: [androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/Placeholder.kt+function:rememberPlaceholderState) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
@Composable
fun rememberPlaceholderState(isVisible: Boolean): PlaceholderState
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/PlaceholderState` that is remembered across compositions.

A `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/PlaceholderState` should be created for each component that has placeholder data, such as a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/Card.composable#Card(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.String,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.wear.compose.material3.CardColors,androidx.compose.foundation.BorderStroke,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.SurfaceTransformation,kotlin.Function1)` or a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/Button.composable#Button(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.String,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.wear.compose.material3.ButtonColors,androidx.compose.foundation.BorderStroke,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.SurfaceTransformation,kotlin.Function1)`. The state is used to coordinate all of the different placeholder effects and animations.

Placeholder has a number of different effects designed to work together. `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/placeholderShimmer.composable#(androidx.compose.ui.Modifier).placeholderShimmer(androidx.wear.compose.material3.PlaceholderState,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color)` does a shimmer animation over the whole component that includes the placeholders. There should only be one placeholderShimmer for each component. `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/placeholder.composable#(androidx.compose.ui.Modifier).placeholder(androidx.wear.compose.material3.PlaceholderState,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color)` draws a placeholder shape on top of content that is waiting to load. There can be multiple placeholders in a component. For example, one for the title of an `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/AppCard.composable#AppCard(kotlin.Function0,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.String,kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.wear.compose.material3.CardColors,androidx.compose.foundation.BorderStroke,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.SurfaceTransformation,kotlin.Function1,kotlin.Function1,kotlin.Function1)`, another for the app name, and so on.

Once all of the components content is loaded, `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#rememberPlaceholderState(kotlin.Boolean)` is `false` the shimmer will stop and a wipe off animation will remove the placeholders to reveal the content.

| Parameters |
|---|---|
| `isVisible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | the initial state of the placeholder. |