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
| Input | Type | Default | Description |
|---|---|---|---|
| type | 'success' | 'error' | 'warning' | 'info' | 'info' | Type of the toast. |
| duration | number | 3000 | Duration of the toast in milliseconds. |
| position | 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'top-right' | Position of the toast. |
| message | string | undefined | Message to display in the toast. |