Skip to content

Instantly share code, notes, and snippets.

@skydoves
Created February 15, 2026 07:18
Show Gist options
  • Select an option

  • Save skydoves/ade2dfd0312cda0255900b7ab0fe5875 to your computer and use it in GitHub Desktop.

Select an option

Save skydoves/ade2dfd0312cda0255900b7ab0fe5875 to your computer and use it in GitHub Desktop.
FlexibleBottomSheet - Programmatic state control
val sheetState = rememberFlexibleBottomSheetState(
isModal = false,
skipSlightlyExpanded = false,
)
val scope = rememberCoroutineScope()
// Expand to full height
Button(onClick = { scope.launch { sheetState.fullyExpand() } }) {
Text("Expand")
}
// Collapse to peek state
Button(onClick = { scope.launch { sheetState.slightlyExpand() } }) {
Text("Collapse")
}
// Hide completely
Button(onClick = { scope.launch { sheetState.hide() } }) {
Text("Hide")
}
// Show at the best available state
Button(onClick = { scope.launch { sheetState.show() } }) {
Text("Show")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment