Toast

Push notifications to visitors with a toast, a lightweight and easily customizable alert message.

Examples

Toasts

Toasts with different types

Code

<wdc-button (click)="showSuccess()" variant="success">Success</wdc-button>
<wdc-button (click)="showError()" variant="danger">Error</wdc-button>
<wdc-button (click)="showWarning()" variant="warning">Warning</wdc-button>
<wdc-button (click)="showInfo()" variant="info">Info</wdc-button>

API Reference

InputTypeDefaultDescription
type'success' | 'error' | 'warning' | 'info''info'Type of the toast.
durationnumber3000Duration of the toast in milliseconds.
position'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right''top-right'Position of the toast.
messagestringundefinedMessage to display in the toast.