Alert
Displays important messages and notifications. Supports success, warning, danger, info types with soft, solid, outline, and accent variants. Features auto-close with progress, collapsible content, loading state, custom colors, marquee text, and alert stacking.
Basic
Info — This is an informational alert.
Success — Your changes have been saved.
Warning — Please review before continuing.
Danger — Something went wrong.
vue
<VxAlert title="Info — This is an informational alert." type="info" />
<VxAlert title="Success — Your changes have been saved." type="success" />
<VxAlert title="Warning — Please review before continuing." type="warning" />
<VxAlert title="Danger — Something went wrong." type="danger" />With Description
Deployment complete
Your application has been successfully deployed to production. All health checks are passing.
Storage almost full
You've used 90% of your available storage. Consider upgrading your plan or removing unused files.
Payment failed
We were unable to process your payment. Please update your billing information to avoid service interruption.
Scheduled maintenance
We'll be performing system maintenance on Saturday from 2:00 AM to 4:00 AM UTC.
vue
<VxAlert
type="success"
title="Deployment complete"
description="Your application has been successfully deployed to production."
/>Closable
You can dismiss this alert.
File uploaded
Your document has been uploaded. You can close this notification.
vue
<VxAlert type="info" title="You can dismiss this alert." closable />Solid Variant
New version available — Update now for the latest features.
All systems operational.
API rate limit approaching.
Service outage detected.
vue
<VxAlert type="info" variant="solid" title="New version available." />
<VxAlert type="success" variant="solid" title="All systems operational." />
<VxAlert type="warning" variant="solid" title="API rate limit approaching." />
<VxAlert type="danger" variant="solid" title="Service outage detected." />Outline Variant
Tip — You can use keyboard shortcuts to navigate faster.
Verified — Your email address has been confirmed.
Caution — This action cannot be undone.
Error — Unable to connect to the server.
vue
<VxAlert type="info" variant="outline" title="Tip — Use keyboard shortcuts." />
<VxAlert type="success" variant="outline" title="Verified — Email confirmed." />Accent Variant
Left colored border strip — great for callouts and side notes.
Note
This feature is currently in beta. Some functionality may change.
Tip
You can drag and drop files directly into the upload area.
Warning
Changing this setting will affect all users in your organization.
Important
Deleting your account is permanent and cannot be reversed.
vue
<VxAlert type="info" variant="accent" title="Note"
description="This feature is currently in beta." />
<VxAlert type="danger" variant="accent" title="Important"
description="Deleting your account is permanent." />Auto-close with Progress Bar
Set duration (in ms) to auto-dismiss. Hover pauses the timer.
Saved! This alert will close in 8 seconds.
Hover over me to pause the timer.
Syncing... This alert will close in 10 seconds.
vue
<VxAlert
type="success"
title="Saved! This alert will close in 8 seconds."
:duration="8000"
closable
/>Collapsible
Click the title to expand or collapse the description.
Release notes v2.4.0
New features include dark mode support, improved performance, 12 new components, and enhanced accessibility. Bug fixes for date picker timezone handling and modal focus trap.
Migration guide
1. Update your dependencies to the latest version. 2. Replace deprecated API calls. 3. Run the migration script. 4. Test all affected pages.
vue
<VxAlert
type="info"
title="Release notes v2.4.0"
description="New features include dark mode support, improved performance..."
collapsible
/>Loading State
Replaces the icon with a spinner to indicate a pending operation.
Uploading files...
3 of 5 files uploaded. Please don't close this page.
Verifying payment...
vue
<VxAlert type="info" title="Uploading files..."
description="3 of 5 files uploaded." loading />Custom Color
Use the color prop to apply any custom color, regardless of type.
Custom purple alert
Using a custom color.
Custom teal solid
Custom pink outline
Custom orange accent
Accent variant with custom color.
vue
<VxAlert title="Custom purple alert" color="#8b5cf6" />
<VxAlert title="Custom teal solid" variant="solid" color="#14b8a6" />
<VxAlert title="Custom pink outline" variant="outline" color="#ec4899" />
<VxAlert title="Custom orange accent" variant="accent" color="#f97316" />Marquee (Scrolling Text)
Scrolling text for banner announcements. Use marquee-speed to control speed (default 50).
vue
<VxAlert
type="warning"
variant="solid"
banner
marquee
title="Limited time offer — 50% off all annual plans!"
/>Alert Group (Stacking)
VxAlertGroup animates alert enter/leave transitions. Add and remove alerts dynamically.
New update available
Version 2.4.0 is ready to install.
Backup completed
All data has been backed up successfully.
Storage at 85%
Consider freeing up space soon.
vue
<script setup>
import { ref } from 'vue'
import { VxAlert, VxAlertGroup, VxButton } from 'veloxui'
const alerts = ref([
{ id: 1, type: 'info', title: 'Notification', desc: 'You have a new message.' },
{ id: 2, type: 'success', title: 'Saved', desc: 'Changes saved.' },
])
function removeAlert(id) {
alerts.value = alerts.value.filter(a => a.id !== id)
}
</script>
<template>
<VxAlertGroup>
<VxAlert
v-for="a in alerts"
:key="a.id"
:type="a.type"
:title="a.title"
:description="a.desc"
closable
@close="removeAlert(a.id)"
/>
</VxAlertGroup>
</template>Without Icon
This alert has no icon.
No icon, solid variant.
vue
<VxAlert type="info" title="No icon alert." :show-icon="false" />Centered
Centered alert content.
Centered solid alert.
vue
<VxAlert type="info" title="Centered alert content." center />Banner
vue
<VxAlert type="warning" variant="solid" title="Maintenance tonight." banner closable center />With Action Slot
A new software update is available.
Your session is about to expire.
vue
<VxAlert type="info" title="A new software update is available.">
<template #action>
<VxButton size="sm" variant="outline">Update now</VxButton>
</template>
</VxAlert>API
VxAlert Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | 'default' | 'success' | 'warning' | 'danger' | 'info' | 'info' | Alert type |
variant | 'soft' | 'solid' | 'outline' | 'accent' | 'soft' | Visual style |
title | string | — | Alert title text |
description | string | — | Alert description text |
closable | boolean | false | Show close button |
show-icon | boolean | true | Show type icon |
icon | string | Component | — | Custom icon (overrides default) |
banner | boolean | false | Full-width banner mode |
center | boolean | false | Center the content |
duration | number | 0 | Auto-close after N ms (0 = disabled). Shows progress bar. |
collapsible | boolean | false | Expandable/collapsible description |
loading | boolean | false | Show spinner instead of icon |
color | string | — | Custom color (overrides type color) |
marquee | boolean | false | Scrolling text animation |
marquee-speed | number | 50 | Marquee scroll speed (higher = faster) |
VxAlertGroup Props
| Prop | Type | Default | Description |
|---|---|---|---|
max-count | number | 0 | Max visible alerts (0 = unlimited) |
Slots
| Slot | Description |
|---|---|
default | Additional content below title |
icon | Custom icon content |
title | Custom title content |
description | Custom description content |
action | Action area (right side) |
Events
| Event | Payload | Description |
|---|---|---|
close | — | Emitted when close button clicked or auto-close triggers |
after-close | — | Emitted after the fade-out transition completes |