Skip to content

Properties

This is the list of the properties you can use in React Confirm Toast component.

NameValueDefaultRequiredDescription
customFunctionFunctionDefines the function to confirm.
showConfirmToastbooleanA boolean React state that controls the toast.
setShowConfirmToastReact.Dispatch<React.SetStateAction<boolean>>The setState of the showConfirmToast state.
asModalbooleanfalseToast will be displayed as a modal element, in the center of the viewport and darkening the background.
buttonCloseA11ystring'Close modal'Sets the accessibility text for the buttonClose element.
buttonCloseAttributesReact.ButtonHTMLAttributesSets the HTML Button attributes to pass to the buttonClose element.
buttonNoAttributesReact.ButtonHTMLAttributesSets the HTML Button attributes to pass to the buttonNo element.
buttonNoTextstring'Cancel'Sets the cancel button message.
buttonYesAttributesReact.ButtonHTMLAttributesSets the HTML Button attributes to pass to the buttonYes element.
buttonYesTextstring'Ok'Sets the confirm button message.
classNamestringAdds a class to the element.
position'bottom-left' | 'bottom-right' | 'top-left' | 'top-right''bottom-right'Sets the toast position. It will be ignored if asModal is true.
showCloseIconbooleantrueSets if the close icon is displayed.
theme'light' | 'dark' | 'snow' | 'lilac''light'Sets the toast style theme.
toastTextstring'Do you want to continue?'Sets the toast question text.