Package-level declarations

Types

Link copied to clipboard

Contains default values used for the bottom app bar implementations.

Link copied to clipboard
class SparkBottomAppBarScrollBehavior(val state: BottomAppBarState, val snapAnimationSpec: AnimationSpec<Float>?, val flingAnimationSpec: DecayAnimationSpec<Float>?, val canScroll: () -> Boolean = { true }) : BottomAppBarScrollBehavior

Scroll behavior for BottomAppBar that implements a pinned behavior similar to TopAppBar but with bottom-specific elevation logic. The bottom app bar stays pinned at the bottom and shows elevation when content has been scrolled up from a scrolled-down position (contentOffset 0), indicating there's content above the current scroll position.

Link copied to clipboard

Represents the colors used by a top app bar in different states. This implementation animates the container color according to the top app bar scroll state. It does not animate the leading, headline, or trailing colors.

Link copied to clipboard

Contains default values used for the top app bar implementations.

Functions

Link copied to clipboard
fun BottomAppBar(modifier: Modifier = Modifier, containerColor: Color = BottomAppBarDefaults.containerColor, contentColor: Color = contentColorFor(containerColor), elevation: Dp = BottomAppBarDefaults.ContainerElevation, contentPadding: PaddingValues = BottomAppBarDefaults.ContentPadding, windowInsets: WindowInsets = BottomAppBarDefaults.windowInsets, scrollBehavior: BottomAppBarScrollBehavior? = null, content: @Composable RowScope.() -> Unit)
fun BottomAppBar(actions: @Composable RowScope.() -> Unit, modifier: Modifier = Modifier, floatingActionButton: @Composable () -> Unit? = null, containerColor: Color = BottomAppBarDefaults.containerColor, contentColor: Color = androidx.compose.material3.contentColorFor(containerColor), elevation: Dp = BottomAppBarDefaults.ContainerElevation, contentPadding: PaddingValues = BottomAppBarDefaults.ContentPadding, windowInsets: WindowInsets = BottomAppBarDefaults.windowInsets, scrollBehavior: SparkBottomAppBarScrollBehavior? = null)
Link copied to clipboard
fun CenterAlignedTopAppBar(title: @Composable () -> Unit, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {}, windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, colors: TopAppBarColors = TopAppBarSparkDefaults.centerAlignedTopAppBarColors(), scrollBehavior: TopAppBarScrollBehavior? = null)
Link copied to clipboard
fun LargeTopAppBar(title: @Composable () -> Unit, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {}, windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, colors: TopAppBarColors = TopAppBarSparkDefaults.largeTopAppBarColors(), scrollBehavior: TopAppBarScrollBehavior? = null)
Link copied to clipboard
fun MediumTopAppBar(title: @Composable () -> Unit, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {}, windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, colors: TopAppBarColors = TopAppBarSparkDefaults.mediumTopAppBarColors(), scrollBehavior: TopAppBarScrollBehavior? = null)
Link copied to clipboard
fun NavigationBar(modifier: Modifier = Modifier, windowInsets: WindowInsets = NavigationBarDefaults.windowInsets, elevation: Dp = NavigationBarDefaults.Elevation, content: @Composable RowScope.() -> Unit)
Link copied to clipboard
fun RowScope.NavigationBarItem(selected: Boolean, onClick: () -> Unit, icon: SparkIcon, modifier: Modifier = Modifier, enabled: Boolean = true, label: @Composable () -> Unit? = null, alwaysShowLabel: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

Material Design navigation bar item.

Link copied to clipboard
fun rememberTopAppBarState(initialHeightOffsetLimit: Float = -Float.MAX_VALUE, initialHeightOffset: Float = 0.0f, initialContentOffset: Float = 0.0f): TopAppBarState

Creates a TopAppBarState that is remembered across compositions.

Link copied to clipboard
fun TopAppBar(title: @Composable () -> Unit, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {}, windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, colors: TopAppBarColors = TopAppBarSparkDefaults.topAppBarColors(), scrollBehavior: TopAppBarScrollBehavior? = null)