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


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



<h2 id="rememberexpandablestate-initiallyexpanded-expandanimationspec-collapseanimationspec">rememberExpandableState</h2>

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


```kotlin
@Composable
public fun rememberExpandableState(
    initiallyExpanded: Boolean = false,
    expandAnimationSpec: AnimationSpec<Float> = ExpandableItemsDefaults.expandAnimationSpec,
    collapseAnimationSpec: AnimationSpec<Float> = ExpandableItemsDefaults.collapseAnimationSpec,
): ExpandableState
```


Create and `remember` an `ExpandableState`

Example of an expandable list:


Example of an expandable text:

#### Parameters

| | |
| --- | --- |
| initiallyExpanded | The initial value of the state. |
| expandAnimationSpec | The `AnimationSpec` to use when showing the extra information. |
| collapseAnimationSpec | The `AnimationSpec` to use when hiding the extra information. |