toaster

v4.15.0arrow_drop_down
v4.15.0
STATUS
Passing
DOWNLOADS
211
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
N/A
The toaster is used to show toasts (alerts) on top of an overlay. The toasts will close themselves when the close button is clicked, or after a timeout — the default is 5 seconds.
1 contributor
Install toaster as a package?
Copied
npm i @bit/segmentio.evergreen.toaster
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right

The Toaster manages the interactionsb between the ToasterManger and the toast API.

Properties
NameTypeDefault valueDescription
zIndex
number

The z-index of the toast.

duration
number

Duration of the toast.

onRemove
function

Function called when the toast is all the way closed.

intent
'none' | 'success' | 'warning' | 'danger''none'

The type of the alert.

title
node

The title of the alert.

children
node

Description of the alert.

hasCloseButton
bool

When true, show a close icon button inside of the toast.

isShown
bool

When false, will close the Toast and call onRemove when finished.

bindNotify
(required)
function

Function called with the this.notify function.

bindGetToasts
(required)
function

Function called with the this.getToasts function.

bindCloseAll
(required)
function

Function called with the this.closeAll function.

Help and resources