Skip to main content
Version: Next

AlertDialog API

import { AlertDialog } from '@editora/ui-react';

Props​

PropTypeDescription
childrenReact.ReactNode
closeOnBackdropboolean
closeOnEscboolean
configUIAlertDialogTemplateOptions
dialogIdstring
dismissibleboolean
elevation'none' | 'low' | 'high'
headlessboolean
indicator'line' | 'none'
initialFocusstring
lockWhileLoadingboolean
onCancel(detail: UIAlertDialogCancelDetail) => void
onChange(detail: { id: string; inputValue?: string; checked?: boolean }) => void
onClose(detail: UIAlertDialogCloseDetail) => void
onConfirm(detail: UIAlertDialogConfirmDetail) => void
onDismiss(detail: UIAlertDialogDismissDetail) => void
onOpen(detail: UIAlertDialogOpenDetail) => void
openboolean
radiusnumber | string
roleType'alertdialog' | 'dialog'
size'sm' | 'md' | 'lg' | '1' | '2' | '3'
state'idle' | 'loading' | 'error'
tone'neutral' | 'info' | 'success' | 'warning' | 'danger'
variant'surface' | 'soft' | 'outline' | 'solid'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-alert-dialog>​

AlertDialog renders the ui-alert-dialog custom element from @editora/ui-core, which can also be used without React.

Attributes: aria-describedby, aria-label, aria-labelledby, cancel-text, close-on-backdrop, close-on-esc, confirm-text, description, dialog-role, dismissible, elevation, error-message, headless, indicator, initial-focus, loading-text, lock-while-loading, open, radius, role, size, state, title, tone, variant