ScanbotScaffold

fun ScanbotScaffold(modifier: <Error class: unknown class> = Modifier, scaffoldState: BottomSheetScaffoldState = rememberBottomSheetScaffoldState(), topBar: () -> Unit? = null, overlayContentWithTopBar: Boolean = false, snackbarHost: (<Error class: unknown class>) -> Unit = { SnackbarHost(it) }, floatingActionBar: () -> Unit? = null, floatingActionBarPosition: <Error class: unknown class> = FabPosition.End, floatingActionBarSheetPadding: <Error class: unknown class> = FabSpacing, floatingActionBarScrollTop: <Error class: unknown class> = FabScrollHeight, floatingActionBarScrollBottom: <Error class: unknown class> = 0.dp, horizontalMode: Boolean = false, sheetGesturesEnabled: Boolean = true, sheetShape: <Error class: unknown class> = MaterialTheme.shapes.large, sheetElevation: <Error class: unknown class> = BottomSheetScaffoldDefaults.SheetElevation, sheetBackgroundColor: <Error class: unknown class> = MaterialTheme.colors.surface, sheetContentColor: <Error class: unknown class> = contentColorFor(sheetBackgroundColor), sheetPickHeight: <Error class: unknown class> = BottomSheetScaffoldDefaults.SheetPickHeight, backgroundColor: <Error class: unknown class> = MaterialTheme.colors.background, contentColor: <Error class: unknown class> = contentColorFor(backgroundColor), sheetContent: <Error class: unknown class>.() -> Unit? = null, content: (<Error class: unknown class>) -> Unit)

Material Design standard bottom sheet.

Standard bottom sheets co-exist with the screen’s main UI region and allow for simultaneously viewing and interacting with both regions. They are commonly used to keep a feature or secondary content visible on screen when content in main UI region is frequently scrolled or panned.

Standard bottom sheet image

This component provides an API to put together several material components to construct your screen. For a similar component which implements the basic material design layout strategy with app bars, floating action buttons and navigation drawers, use the standard Scaffold. For similar component that uses a backdrop as the centerpiece of the screen, use BackdropScaffold.

A simple example of a bottom sheet scaffold looks like this:

Parameters

sheetContent

The content of the bottom sheet.

modifier

An optional Modifier for the root of the scaffold.

scaffoldState

The state of the scaffold.

topBar

An optional top app bar.

snackbarHost

The composable hosting the snackbars shown inside the scaffold.

floatingActionBar

An optional floating action button.

floatingActionBarPosition

The position of the floating action button.

sheetGesturesEnabled

Whether the bottom sheet can be interacted with by gestures.

sheetShape

The shape of the bottom sheet.

sheetElevation

The elevation of the bottom sheet.

sheetBackgroundColor

The background color of the bottom sheet.

sheetContentColor

The preferred content color provided by the bottom sheet to its children. Defaults to the matching content color for sheetBackgroundColor, or if that is not a color from the theme, this will keep the same content color set above the bottom sheet.

sheetPickHeight

The height of the bottom sheet when it is collapsed. If the pick height equals the sheet's full height, the sheet will only have a collapsed state.

drawerContent

The content of the drawer sheet.

drawerGesturesEnabled

Whether the drawer sheet can be interacted with by gestures.

drawerShape

The shape of the drawer sheet.

drawerElevation

The elevation of the drawer sheet.

drawerBackgroundColor

The background color of the drawer sheet.

drawerContentColor

The preferred content color provided by the drawer sheet to its children. Defaults to the matching content color for drawerBackgroundColor, or if that is not a color from the theme, this will keep the same content color set above the drawer sheet.

drawerScrimColor

The color of the scrim that is applied when the drawer is open.

content

The main content of the screen. You should use the provided PaddingValues to properly offset the content, so that it is not obstructed by the bottom sheet when collapsed.

Samples

androidx.compose.material.samples.BottomSheetScaffoldSample