Modify default configuration
toast.config({ classes: { host: 'toast', enter: 'toast-enter', leave: 'toast-leave', backdrop: 'toast-backdrop' }, });
Display a toast
toast('content').then(() => {}); toast('content', {}).then(() => {}); toast({content: 'content'}).then(() => {});
Full configuration
toast({ content: 'content', animation: true, duration: 1000, backdrop: false, unsafe: false, center: false, host: document.body, });
Generated using TypeDoc
Toast
Example
Modify default configuration
toast.config({ classes: { host: 'toast', enter: 'toast-enter', leave: 'toast-leave', backdrop: 'toast-backdrop' }, });
Display a toast
toast('content').then(() => {}); toast('content', {}).then(() => {}); toast({content: 'content'}).then(() => {});
Full configuration
toast({ content: 'content', animation: true, duration: 1000, backdrop: false, unsafe: false, center: false, host: document.body, });