Cheers! A toast is a UI popup that usually animates in from an edge, then out again.
toast.js puts two functions into global scope.
- Begins the toast animation. The
textparameter can actually contain any HTML markup, including images.
- Returns a Boolean if a toast is available or not. If a toast is already animating, this function returns
false. If no toasts are currently active, this function returns
The default CSS styling and animation can easily be replaced. The
styles array can include any CSS rulesets for the dynamically inserted element