KasyKasy

Dialog

Live preview and documentation for the Dialog component.

Preview

componentPreview.loading

About

Centered modal card: icon bubble, title, body, an optional close control, and an actions footer. Present it with showKasyDialog or showKasyBlurDialog (blurred backdrop); prefer KasyButton inside actions.

  • leadingIcon / iconTone: icon in the top bubble and its tone (info, success, warning, danger, neutral). Omit leadingIcon for a compact header (title + close button only).
  • title / titleCentered: the dialog's title; centered when there's no leadingIcon.
  • closeAboveTitle: puts the close button on its own line above the title (only when there's no leadingIcon and no titleCentered).
  • message / body: message renders a simple subtitle; body replaces it with a custom widget (e.g. a form) and takes priority.
  • footer: replaces the entire default footer with something custom.
  • confirmLabel / onConfirm: single button on the right (used when footer and actions are both empty).
  • actions / actionsAxis: list of buttons that replaces confirmLabel; Axis.vertical (default, stacked, primary action on top) or Axis.horizontal (side by side, equal flex).
  • showCloseButton / onClose / closeButtonStyle: shows the "X" (standard, 24px, default; or filledNeutral, a larger circle, adjustable via closeFilledButtonExtent/closeFilledIconGlyphSize); onClose overrides the default Navigator.pop.
  • showKasyConfirmDialog: ready-made shortcut for a confirm/cancel dialog (2 buttons, supports destructive for a danger variant and onConfirmAsync with a loading state).
  • KasyDialogScrollableBody: wraps long content with a max height and internal scroll, with edge fades that only appear when the content actually scrolls.

Last updated on 08/23/2026

On this page