BottomAppBarDefaults


Contains default values used for the bottom app bar implementations.

Summary

Public functions

BottomAppBarScrollBehavior
@ExperimentalMaterial3Api
@Composable
exitAlwaysScrollBehavior(
    state: BottomAppBarState,
    canScroll: () -> Boolean,
    snapAnimationSpec: AnimationSpec<Float>?,
    flingAnimationSpec: DecayAnimationSpec<Float>?
)

Returns a BottomAppBarScrollBehavior.

Cmn

Public properties

Dp

Default elevation used for BottomAppBar

Cmn
PaddingValues

Default padding used for BottomAppBar when content are default size (24dp) icons in IconButton that meet the minimum touch target (48.dp).

Cmn
Arrangement.Horizontal
Cmn
Color

The color of a BottomAppBar's FloatingActionButton

Cmn
Color

Default color used for BottomAppBar container

Cmn
WindowInsets

Default insets that will be used and consumed by BottomAppBar.

Cmn

Public functions

exitAlwaysScrollBehavior

@ExperimentalMaterial3Api
@Composable
fun exitAlwaysScrollBehavior(
    state: BottomAppBarState = rememberBottomAppBarState(),
    canScroll: () -> Boolean = { true },
    snapAnimationSpec: AnimationSpec<Float>? = MotionSchemeKeyTokens.FastSpatial.value(),
    flingAnimationSpec: DecayAnimationSpec<Float>? = rememberSplineBasedDecay()
): BottomAppBarScrollBehavior

Returns a BottomAppBarScrollBehavior. A bottom app bar that is set up with this BottomAppBarScrollBehavior will immediately collapse when the content is pulled up, and will immediately appear when the content is pulled down.

Parameters
state: BottomAppBarState = rememberBottomAppBarState()

the state object to be used to control or observe the bottom app bar's scroll state. See rememberBottomAppBarState for a state that is remembered across compositions.

canScroll: () -> Boolean = { true }

a callback used to determine whether scroll events are to be handled by this ExitAlwaysScrollBehavior

snapAnimationSpec: AnimationSpec<Float>? = MotionSchemeKeyTokens.FastSpatial.value()

an optional AnimationSpec that defines how the bottom app bar snaps to either fully collapsed or fully extended state when a fling or a drag scrolled it into an intermediate position

flingAnimationSpec: DecayAnimationSpec<Float>? = rememberSplineBasedDecay()

an optional DecayAnimationSpec that defined how to fling the bottom app bar when the user flings the app bar itself, or the content below it

Public properties

ContainerElevation

val ContainerElevationDp

Default elevation used for BottomAppBar

ContentPadding

val ContentPaddingPaddingValues

Default padding used for BottomAppBar when content are default size (24dp) icons in IconButton that meet the minimum touch target (48.dp).

HorizontalArrangement

val HorizontalArrangementArrangement.Horizontal

bottomAppBarFabColor

val bottomAppBarFabColorColor

The color of a BottomAppBar's FloatingActionButton

containerColor

val containerColorColor

Default color used for BottomAppBar container

windowInsets

val windowInsetsWindowInsets

Default insets that will be used and consumed by BottomAppBar.