androidx.compose.material3
rememberSearchBarStateSince 1.9Experimental
Function
No hand-written docs yet.
Create and remember a SearchBarState.
ParametersExperimental
@Composable
fun rememberSearchBarState(
initialValue: SearchBarValue = SearchBarValue.Collapsed,
animationSpecForExpand: AnimationSpec<Float> = MotionSchemeKeyTokens.SlowSpatial.value(),
animationSpecForCollapse: AnimationSpec<Float> = MotionSchemeKeyTokens.DefaultSpatial.value(),
): 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.SlowSpatial.value()
the animation spec used when the search bar expands.
animationSpecForCollapse: AnimationSpec<Float>Optional
animationSpecForCollapse: AnimationSpec<Float>OptionalDefault: MotionSchemeKeyTokens.DefaultSpatial.value()
the animation spec used when the search bar collapses.
Library docs
Create and remember a SearchBarState.