Notification API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
type | "default" | "info" | "success" | "warning" | "danger" | "loading" | "default" | Controls the color and icon of the notification. |
icon | string | — | Overrides the default icon for the notification type. |
color | string | — | Custom color for the title and icon. Accepts named colors (e.g. 'info') or base color with shade (e.g. 'blue-400'). Only applies when type is 'default'. |
closable | boolean | false | Shows a close button. Once closed, the notification will not appear again. |
autoclose | boolean | false | Automatically dismisses the notification. Remaining time is shown by a progress indicator. |
key | string | — | Unique identifier for persisting the closed state. In Vue, use :key.prop="'somekey'" because key is reserved. |
JavaScript API
| Name | Kind | Description | |
|---|---|---|---|
close() | action | Closes the notification. | |
Events
| Event | Description | Returns | |
|---|---|---|---|
appear | Fires when the component is rendered. | { detail: { component } } | |
close | Fires when the notification is closed. | — | |