AnyLumino
API referenceastryxsurfaces

AlertDialog

Render an inline Astryx alert dialog for confirmations.

Astryx Props

JSON-safe AlertDialog props forwarded to Astryx.

Supported Astryx props include:

  • isOpen (boolean; required): Whether the dialog is open.
  • onOpenChange ((isOpen: boolean) => unknown; required): Visibility change callback.
  • title (string; required): Dialog title. Linked via aria-labelledby.
  • description (string; required): Consequence description. Linked via aria-describedby.
  • actionLabel (string; required): Action button label.
  • onAction (() => unknown; required): Called when action button is clicked. Does NOT auto-close.
  • cancelLabel (string): Cancel button label.
  • actionVariant (ButtonVariant): Action button variant.
  • isActionLoading (boolean): Shows loading spinner on the action button.
  • width (number or string): Dialog width.
  • isInline (boolean): Renders alert dialog content inline without modal behavior. For documentation previews and showcases only.

Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.

See Astryx component docs: https://astryx.atmeta.com/components/AlertDialog.

Notes

The wrapper defaults to inline rendering to avoid modal focus-management conflicts inside Jupyter output areas. The primary action emits a click message with action="confirm".

Functions

constructor__init__(title, description, *, action_label, cancel_label='Cancel', open=True, inline=True, callbacks=None, action_callbacks=None, action_variant=None, action_loading=None, width=None, **props) -> None
paramtitlestr

Dialog title linked to the alert for accessibility.

paramdescriptionstr

Consequence or confirmation text linked to the alert for accessibility.

paramaction_labelstr

Primary action button label.

paramcancel_labelstr
= 'Cancel'

Cancel button label.

paramopenbool
= True

Controlled open state synchronized through is_open.

paraminlinebool
= True

Whether dialog content renders inline instead of using native modal behavior.

paramcallbacksIterable[Callable[[ComponentWidget], None]] | None
= None

Python callbacks invoked when the primary action is activated.

paramaction_callbacksIterable[Callable[[ComponentWidget, Any], None]] | None
= None

Python callbacks receiving the "confirm" action identifier.

paramaction_variantstr | None
= None

Primary action button variant.

paramaction_loadingbool | None
= None

Whether the primary action shows a loading state.

paramwidthint | float | str | None
= None

Dialog width.

parampropsAny
= {}

Returns

None

On this page