Color Schemes for useToast are not implemented in the default theme. You can extend the theme to implement them.
Toast
The toast component is used to give feedback to users after an action has taken place.
Props#
colorScheme
colorSchemestringcontainerStyle
containerStyleOptional style overrides for the container wrapping the toast component.
CSSPropertiesdescription
descriptionThe description of the toast
ReactNodeduration
durationThe delay before the toast hides (in milliseconds)
If set to null, toast will never dismiss.
number | null5000 ( = 5000ms )icon
iconA custom icon that will be displayed by the toast.
ReactNodeid
idThe id of the toast.
Mostly used when you need to prevent duplicate.
By default, we generate a unique id for each toast
ToastIdisClosable
isClosableIf true, toast will show a close button
booleanonCloseComplete
onCloseCompleteCallback function to run side effects after the toast has closed.
(() => void)position
positionThe placement of the toast
ToastPosition"bottom"render
renderRender a component toast component.
Any component passed will receive 2 props: id and onClose.
((props: RenderProps) => ReactNode)size
sizeSizes for useToast are not implemented in the default theme. You can extend the theme to implement them.
stringstatus
statusThe status of the toast.
"info" | "warning" | "success" | "error" | "loading"title
titleThe title of the toast
ReactNodevariant
variantVariants for useToast are not implemented in the default theme. You can extend the theme to implement them.
stringProps#
colorScheme
colorSchemeColor Schemes for useToast are not implemented in the default theme. You can extend the theme to implement them.
stringcontainerStyle
containerStyleOptional style overrides for the container wrapping the toast component.
CSSPropertiesdescription
descriptionThe description of the toast
ReactNodeduration
durationThe delay before the toast hides (in milliseconds)
If set to null, toast will never dismiss.
number | null5000 ( = 5000ms )icon
iconA custom icon that will be displayed by the toast.
ReactNodeid
idThe id of the toast.
Mostly used when you need to prevent duplicate.
By default, we generate a unique id for each toast
ToastIdisClosable
isClosableIf true, toast will show a close button
booleanonCloseComplete
onCloseCompleteCallback function to run side effects after the toast has closed.
(() => void)position
positionThe placement of the toast
ToastPosition"bottom"render
renderRender a component toast component.
Any component passed will receive 2 props: id and onClose.
((props: RenderProps) => ReactNode)size
sizeSizes for useToast are not implemented in the default theme. You can extend the theme to implement them.
stringstatus
statusThe status of the toast.
"info" | "warning" | "success" | "error" | "loading"title
titleThe title of the toast
ReactNodevariant
variantVariants for useToast are not implemented in the default theme. You can extend the theme to implement them.
string