Feedback

SKDialog

SKDialog provides a predictable dialog contract: title, supporting text, up to two actions and an optional custom body. Dismissal rules are configurable for destructive flows.

Betasince 1.6.0Compose · XML plannedAll components

Not yet released. SKDialog is planned for 1.6.0; the current published release (1.4.0-alpha01) ships SKText and SKTextField only.

Usage

SKDialog.kt
SKDialog(
    title = "Delete workspace?",
    body = "This removes all projects and cannot be undone.",
    confirm = SKAction("Delete", destructive = true, onClick = ::delete),
    dismiss = SKAction("Cancel", onClick = ::close)
)

Props

PropTypeDefaultDescription
titleString—Dialog heading.
bodyString?nullSupporting text.
confirmSKAction—Primary action.

Accessibility

Focus is trapped while open, ESC/back dismisses when dismissible, title is the accessible name.

Theming

Scrim opacity and container colour come from SKTheme.

API surface

  • SKDialog
  • SKAction

Related