Dialog

UX

View Source

A UX compliant dialog that uses HTMLDialogElement under the hood.

Simple Dialog

Look at this information

My Custom Dialog

That has a subtitle

Composable content area

Props

bodyReactReactNode | string

Body of the dialog to display in the main content area.

Text to display on the cancel button.

Text to display on the confirm button.

Text to display on the destroy button.

dialogRefReactMutableRefObject

Create with the React.useRef() hook and pass the ref to the dialog.

onCancelClick() => void

Callback fired when the cancel button is clicked.

onCloseClick() => void

Callback fired when the close (X) button is clicked.

onConfirmClick() => void

Callback fired when the confirm button is clicked.

onDestroyClick() => void

Callback fired when the destroy button is clicked.

showCancelboolean

Determines whether the cancel button is shown.

Determines whether the destroy button is shown.

subtitlestring

Subtitle of the dialog to display in the header. No subtitle appears if omitted.

titlestring

Title of the dialog to display in the header.