Composable Function

rememberExpandableState

Create and remember an ExpandableState Example of an expandable list: Example of an expandable text:

rememberExpandableState

Source set: Android
@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.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: