Jenga List Sheet
A modal bottom sheet with a title, a lazily laid out body, and an optional footer pinned to the bottom, above the keyboard. Use it for pickers and short forms; for free-form content use JengaBottomSheet.
Control visibility by conditional composition, as with JengaBottomSheet.
Parameters
called when the sheet is dismissed (drag down or scrim).
the heading shown at the top of the sheet.
the Modifier for the sheet.
the sheet state; pass one from rememberJengaSheetState to show or hide the sheet imperatively.
optional supporting line under the title.
optional slot at the end of the title row (e.g. a close button).
optional row pinned to the bottom of the sheet, for actions.
the title text style.
the subtitle text style.
the subtitle color.
padding around the header.
padding around the lazy body.
padding around the footer row.
gap between footer children.
the sheet body, laid out lazily in a LazyListScope.
Samples
var open by remember {
mutableStateOf(
value = true,
)
}
var selected by remember {
mutableStateOf(
value = "Gate A",
)
}
if (open) {
JengaListSheet(
onDismissRequest = { open = false },
title = "Select a gate",
subtitle = "Choose which gate you're scanning at.",
footer = {
JengaButton(
text = "Done",
onClick = { open = false },
modifier = Modifier.weight(
weight = 1f,
),
)
},
content = {
items(
items = listOf(
"Gate A",
"Gate B",
),
) { gate ->
JengaRadioListItem(
headline = gate,
selected = gate == selected,
onClick = { selected = gate },
)
}
},
)
}A JengaListSheet whose subtitle is styled text (e.g. a monospaced id beside plain words).
Parameters
called when the sheet is dismissed (drag down or scrim).
the heading shown at the top of the sheet.
the supporting line under the title, with styled spans.
the Modifier for the sheet.
the sheet state; pass one from rememberJengaSheetState to show or hide the sheet imperatively.
optional slot at the end of the title row (e.g. a close button).
optional row pinned to the bottom of the sheet, for actions.
the title text style.
the subtitle text style.
the subtitle color.
padding around the header.
padding around the lazy body.
padding around the footer row.
gap between footer children.
the sheet body, laid out lazily in a LazyListScope.