Skip to content

Alert

Contextual feedback banners with a colored left border, icon, optional title, and dismiss button.

Examples

Info

Tailwind v4
vue
<Alert variant="info" title="Heads up">
  Your session will expire in 10 minutes. Save any unsaved changes.
</Alert>

Success

Tailwind v4
vue
<Alert variant="success" title="Changes saved">
  Your plant configuration was updated successfully.
</Alert>

Warning

Tailwind v4
vue
<Alert variant="warning" title="Approaching quota">
  You have used 85% of your monthly export allowance.
</Alert>

Danger

Tailwind v4
vue
<Alert variant="danger" title="Action required">
  Two pieces of equipment have overdue maintenance inspections.
</Alert>

Dismissible

Tailwind v4
vue
<Alert variant="info" title="New feature" dismissible @dismiss="onDismiss">
  Sieve test reports can now be exported as PDF. Check the Reports tab.
</Alert>

No title

Tailwind v4
vue
<Alert variant="success">
  Loadout event recorded successfully.
</Alert>

Props

PropTypeDefaultDescription
variant'info' | 'success' | 'warning' | 'danger''info'Color and icon style
titlestringBold heading above the slot content
dismissiblebooleanfalseShow a close button; hides the alert on click

Emits

EventPayloadDescription
dismissFired when the user clicks the dismiss button

Slots

SlotDescription
defaultAlert body content

Private — Jetpack Labs internal use only