Skip to main content
Version: Next

Dialog API

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

Props​

PropTypeDescription
cancelTextstring
childrenReact.ReactNode
closableboolean
closeOnEscboolean
closeOnOverlayboolean
configUIDialogTemplateOptions
descriptionstring
dialogIdstring
dismissibleboolean
headlessboolean
initialFocusstring
loadingTextstring
lockWhileLoadingboolean
onClose() => void
onDialogCancel(detail: UIDialogCancelDetail) => void
onDialogClose(detail: UIDialogCloseDetail) => void
onDialogDismiss(detail: UIDialogDismissDetail) => void
onDialogOpen(detail: UIDialogOpenDetail) => void
onDialogSubmit(detail: UIDialogSubmitDetail) => void
onOpen() => void
onRequestClose(detail: DialogRequestCloseDetail) => void
openboolean
roleType'dialog' | 'alertdialog'
size'sm' | 'md' | 'lg' | '1' | '2' | '3'
state'idle' | 'loading' | 'error' | 'success'
submitTextstring
titlestring

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

Element: <ui-dialog>​

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

Attributes: aria-describedby, aria-label, aria-labelledby, cancel-text, closable, close-on-backdrop, close-on-esc, close-on-overlay, description, dialog-role, dismissible, error-message, headless, initial-focus, loading-text, lock-while-loading, open, role, size, state, submit-text, title

Events: hide, request-close, show, ui-request-close