StylishBottomSheetScaffold

fun StylishBottomSheetScaffold(sheetContent: @Composable ColumnScope.() -> Unit, modifier: Modifier = Modifier, scaffoldState: BottomSheetScaffoldState = rememberBottomSheetScaffoldState(), sheetPeekHeight: Dp = BottomSheetDefaults.SheetPeekHeight, sheetMaxWidth: Dp = BottomSheetDefaults.SheetMaxWidth, sheetShape: Shape = RoundedCornerShape( topStart = StylishTheme.dimensions.connectedCornerRadius, topEnd = StylishTheme.dimensions.connectedCornerRadius, ), sheetContainerColor: Color = MaterialTheme.colorScheme.surface, sheetContentColor: Color = contentColorFor(sheetContainerColor), sheetTonalElevation: Dp = 0.dp, sheetShadowElevation: Dp = BottomSheetDefaults.Elevation, sheetDragHandle: @Composable () -> Unit? = null, sheetSwipeEnabled: Boolean = true, topBar: @Composable () -> Unit? = null, snackbarHost: @Composable (SnackbarHostState) -> Unit = { SnackbarHost(it) }, containerColor: Color = MaterialTheme.colorScheme.surface, contentColor: Color = contentColorFor(containerColor), content: @Composable (PaddingValues) -> Unit)

A scaffold with a bottom sheet, wrapping the Material 3 BottomSheetScaffold with Stylish defaults.

The scaffold hosts a persistent, partially expandable sheetContent above a full-screen content area, with optional topBar and snackbarHost slots. The sheet's top corners use StylishTheme.dimensions.connectedCornerRadius, matching com.segnities007.stylishui.components.organisms.StylishBottomSheet.

Parameters

sheetContent

The sheet content, laid out inside a ColumnScope.

modifier

Modifier applied to the BottomSheetScaffold root.

scaffoldState

State of the scaffold (sheet + snackbar host). Defaults to rememberBottomSheetScaffoldState.

sheetPeekHeight

Height of the sheet in its peek (collapsed) state. Defaults to BottomSheetDefaults.SheetPeekHeight.

sheetMaxWidth

Maximum width of the sheet. Defaults to BottomSheetDefaults.SheetMaxWidth.

sheetShape

Corner shape of the sheet. Defaults to RoundedCornerShape with StylishTheme.dimensions.connectedCornerRadius on the top corners only.

sheetContainerColor

Background color of the sheet. Defaults to MaterialTheme.colorScheme.surface.

sheetContentColor

Default content color of the sheet. Defaults to contentColorFor of sheetContainerColor.

sheetTonalElevation

Tonal elevation of the sheet. Defaults to 0 dp (the M3 spec value).

sheetShadowElevation

Shadow elevation of the sheet. Defaults to BottomSheetDefaults.Elevation.

sheetDragHandle

Optional drag handle composable. When null (the default), no drag handle is shown. Pass @Composable { BottomSheetDefaults.DragHandle() } for the M3 default handle.

sheetSwipeEnabled

When false, the sheet cannot be swiped up or down. Defaults to true.

topBar

Optional top bar rendered above the content, e.g. a StylishTopAppBar. When null, no top bar is shown.

snackbarHost

Composable that renders transient messages using the SnackbarHostState of scaffoldState. Defaults to the M3 SnackbarHost.

containerColor

Background color behind all content. Defaults to MaterialTheme.colorScheme.surface.

contentColor

Default content color propagated to content. Defaults to contentColorFor of containerColor.

content

Main page content. Receives the PaddingValues that account for the top bar and the sheet; apply them via Modifier.padding.

See also