boolean
Toast
The toast component is used to give feedback to users after an action has taken place.
Props#
addRole
addRole
false
containerStyle
containerStyle
Optional style overrides for the container wrapping the toast component.
SystemProps
description
description
The description of the toast
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNode
duration
duration
The delay before the toast hides (in milliseconds)
If set to null
, toast will never dismiss.
number
5000 ( = 5000ms )
icon
icon
A custom icon that will be displayed by the toast.
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNode
id
id
The id
of the toast.
Mostly used when you need to prevent duplicate.
By default, we generate a unique id
for each toast
ToastId
isClosable
isClosable
If true
, toast will show a close button
boolean
false
onClose
onClose
() => void
onCloseComplete
onCloseComplete
Callback function to run side effects after the toast has closed.
() => void
position
position
The placement of the toast
ToastPosition
bottom
render
render
Render a component toast component.
Any component passed will receive 2 props: id
and onClose
.
(props: RenderProps) => ReactNode
status
status
The status of the toast.
"success" | "error" | "warning" | "info" | "loading"
title
title
The title of the toast
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNode
Props#
addRole
addRole
boolean
false
containerStyle
containerStyle
Optional style overrides for the container wrapping the toast component.
SystemProps
description
description
The description of the toast
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNode
duration
duration
The delay before the toast hides (in milliseconds)
If set to null
, toast will never dismiss.
number
5000 ( = 5000ms )
icon
icon
A custom icon that will be displayed by the toast.
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNode
id
id
The id
of the toast.
Mostly used when you need to prevent duplicate.
By default, we generate a unique id
for each toast
ToastId
isClosable
isClosable
If true
, toast will show a close button
boolean
false
onClose
onClose
() => void
onCloseComplete
onCloseComplete
Callback function to run side effects after the toast has closed.
() => void
position
position
The placement of the toast
ToastPosition
bottom
render
render
Render a component toast component.
Any component passed will receive 2 props: id
and onClose
.
(props: RenderProps) => ReactNode
status
status
The status of the toast.
"success" | "error" | "warning" | "info" | "loading"
title
title
The title of the toast
type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNode