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
initialValue: SearchBarValueOptionalDefault: SearchBarValue.Collapsed
the initial value of whether the search bar is collapsed or expanded.
animationSpecForExpand: AnimationSpec<Float>Optional
animationSpecForExpand: AnimationSpec<Float>OptionalDefault: MotionSchemeKeyTokens.DefaultSpatial.value()
the animation spec used when the search bar expands.
animationSpecForCollapse: AnimationSpec<Float>Optional
animationSpecForCollapse: AnimationSpec<Float>OptionalDefault: MotionSchemeKeyTokens.FastSpatial.value()
the animation spec used when the search bar collapses.
animationSpecForContentFadeIn: AnimationSpec<Float>Optional
animationSpecForContentFadeIn: AnimationSpec<Float>OptionalDefault: AnimationForContentFadeInSpec
the animation spec used for the content when the search bar expands.
animationSpecForContentFadeOut: AnimationSpec<Float>Optional
animationSpecForContentFadeOut: AnimationSpec<Float>OptionalDefault: 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.