Components
BaseAlert
An inline message about the page, with an optional title and actions, readable in both themes.
components/ui/BaseAlert.vue
View in the demo
Types
A new version is available. Refresh to update.
Your changes were saved.
Your trial ends in 3 days.
We could not save your changes.
Update available
A new version is available. Refresh to update.
Saved
Your changes were saved.
Trial ending
Your trial ends in 3 days.
Something went wrong
We could not save your changes.
Actions and icon
We could not save your changes.
Trial ending
Your trial ends in 3 days.
Any Lucide icon can replace the default one.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
type | AlertType | "info" | info, success, warning or error. |
title | string | — | A bold first line. With it, the text switches to the normal text colour. |
text | string | — | The message. The default slot replaces it. |
icon | string | — | Replaces the default icon of the type. |
action-text | string | — | Adds one action button. |
action-loading | boolean | — | Shows that button loading. |
Slots
Name | Slot props | Description |
|---|---|---|
#default | — | Replaces text. |
#actions | — | Several buttons; they get the surface background automatically. |
Events
Name | Payload | Description |
|---|---|---|
@action | — | The action button was pressed. |
Accessibility
Errors use role="alert" and are announced at once; the other types use role="status". Every light-theme status colour keeps a 4.5:1 contrast against its tint.