Skip to content

BottomSheet

BottomSheetHandle presents application-defined content in a theme-shaped, bottom-aligned modal surface.

auto sheets = UseBottomSheet();
Button("Share").OnClick([sheets] {
sheets.Show([](BottomSheetContext sheet) {
return Column {
Text("Share with", TextRole::Title),
Button("Copy link").OnClick([sheet] {
CopyLink();
sheet.Dismiss();
}),
}.With(Padding(24.0F), Spacing(12.0F));
});
})

The factory may take no context or receive BottomSheetContext. BottomSheetOptions controls cancel and outside-press dismissal. The handle returns a LayerId and can dismiss it explicitly.

Use the context-aware factory when an action completes the sheet’s task. An outside or platform-cancel request follows BottomSheetOptions rather than bypassing application policy.

BottomSheetStyle controls scrim, surface, top corners, shadow, drag-handle geometry, maximum width, and enter/exit animation. Content retains the environment captured at Show time.

  • UseBottomSheet() -> BottomSheetHandle.
  • Show(ViewFactory, BottomSheetOptions = {}).
  • Show(BottomSheetFactory, BottomSheetOptions = {}) and bound-argument template.
  • Dismiss(LayerId).
  • BottomSheetContext::Id() and Dismiss().
  • BottomSheetOptions and BottomSheetStyle.

See Dialog for centered modal presentation.