booleanToast
The toast component is used to give feedback to users after an action has taken place.
Props#
addRole
addRolefalsecontainerStyle
containerStyleOptional style overrides for the container wrapping the toast component.
SystemPropsdescription
descriptionThe description of the toast
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNodeduration
durationThe delay before the toast hides (in milliseconds)
If set to null, toast will never dismiss.
number5000 ( = 5000ms )icon
iconA custom icon that will be displayed by the toast.
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNodeid
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
booleanfalseonClose
onClose() => voidonCloseComplete
onCloseCompleteCallback function to run side effects after the toast has closed.
() => voidposition
positionThe placement of the toast
ToastPositionbottomrender
renderRender a component toast component.
Any component passed will receive 2 props: id and onClose.
(props: RenderProps) => ReactNodestatus
statusThe status of the toast.
"success" | "error" | "warning" | "info" | "loading"title
titleThe title of the toast
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNodeProps#
addRole
addRolebooleanfalsecontainerStyle
containerStyleOptional style overrides for the container wrapping the toast component.
SystemPropsdescription
descriptionThe description of the toast
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNodeduration
durationThe delay before the toast hides (in milliseconds)
If set to null, toast will never dismiss.
number5000 ( = 5000ms )icon
iconA custom icon that will be displayed by the toast.
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNodeid
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
booleanfalseonClose
onClose() => voidonCloseComplete
onCloseCompleteCallback function to run side effects after the toast has closed.
() => voidposition
positionThe placement of the toast
ToastPositionbottomrender
renderRender a component toast component.
Any component passed will receive 2 props: id and onClose.
(props: RenderProps) => ReactNodestatus
statusThe status of the toast.
"success" | "error" | "warning" | "info" | "loading"title
titleThe title of the toast
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNode