androidx.compose.material3

rememberSearchBarWithGapStateSince 1.12Experimental

Function

No hand-written docs yet.

Create and remember a SearchBarState to use in conjunction with ExpandedDockedSearchBarWithGap.

ParametersExperimental

@Composable
fun rememberSearchBarWithGapState(
    initialValue: SearchBarValue = SearchBarValue.Collapsed,
    animationSpecForExpand: AnimationSpec<Float> = MotionSchemeKeyTokens.DefaultSpatial.value(),
    animationSpecForCollapse: AnimationSpec<Float> = MotionSchemeKeyTokens.FastSpatial.value(),
    animationSpecForContentFadeIn: AnimationSpec<Float> = AnimationForContentFadeInSpec,
    animationSpecForContentFadeOut: AnimationSpec<Float> = AnimationForContentFadeOutSpec,
): SearchBarState

initialValue: SearchBarValueOptional

Default: SearchBarValue.Collapsed

the initial value of whether the search bar is collapsed or expanded.

animationSpecForExpand: AnimationSpec<Float>Optional

Default: MotionSchemeKeyTokens.DefaultSpatial.value()

the animation spec used when the search bar expands.

animationSpecForCollapse: AnimationSpec<Float>Optional

Default: MotionSchemeKeyTokens.FastSpatial.value()

the animation spec used when the search bar collapses.

animationSpecForContentFadeIn: AnimationSpec<Float>Optional

Default: AnimationForContentFadeInSpec

the animation spec used for the content when the search bar expands.

animationSpecForContentFadeOut: AnimationSpec<Float>Optional

Default: AnimationForContentFadeOutSpec

the animation spec used for the content when the search bar collapses.

Library docs

Create and remember a SearchBarState to use in conjunction with ExpandedDockedSearchBarWithGap.