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) -> NoneparamtitlestrDialog title linked to the alert for accessibility.
paramdescriptionstrConsequence or confirmation text linked to the alert for accessibility.
paramaction_labelstrPrimary action button label.
paramcancel_labelstr= 'Cancel'Cancel button label.
paramopenbool= TrueControlled open state synchronized through is_open.
paraminlinebool= TrueWhether dialog content renders inline instead of using native modal behavior.
paramcallbacksIterable[Callable[[ComponentWidget], None]] | None= NonePython callbacks invoked when the primary action is activated.
paramaction_callbacksIterable[Callable[[ComponentWidget, Any], None]] | None= NonePython callbacks receiving the "confirm" action identifier.
paramaction_variantstr | None= NonePrimary action button variant.
paramaction_loadingbool | None= NoneWhether the primary action shows a loading state.
paramwidthint | float | str | None= NoneDialog width.
parampropsAny= {}Returns
None