Skip to content

Android components Overlays

StanceDialog

Beta

A dialog for a focused task with custom content and actions.

  • PlatformAndroid, Jetpack Compose
  • Builds onBasicAlertDialog
  • Kindcomposable

Preview

Rendered by the Jetpack Compose library, not drawn by hand.

StanceDialog on AndroidStanceDialog on AndroidStanceDialog on Android
StanceDialog, Light appearance
Light
StanceDialog, Dark appearance
Dark
StanceDialog, High contrast appearance
High contrast

Usage

kotlin
var open by remember { mutableStateOf(false) }
StanceButton("Rename template", onClick = { open = true }, variant = StanceButtonVariant.Outline)
if (open) {
    StanceDialog(
        title = "Rename template",
        onDismissRequest = { open = false },
        actions = { StanceButton("Save", onClick = { open = false }) },
    ) {
        StanceTextField("Sales team", {}, label = "Template name")
    }
}

Accessibility

  • The title is a heading.
  • Dismisses on back and outside taps.

On other platforms