Skip to content

Laravel Alert Component

Free · MIT

Contextual feedback messages for user actions and system events.

A Alert built for the TALL stack — Blade, Livewire 3 & 4, Alpine.js and Tailwind CSS 4. Server-rendered by default, dark-mode ready, and WCAG-minded. Drop it in with a single Blade tag: <x-aura::alert>

Installation

composer require bluestarsystem/aura-ui

Usage

<x-aura::alert variant="info">
    This is an informational message.
</x-aura::alert>

See the full API, props and live examples in the Alert documentation.

Overview

The Alert component displays contextual feedback messages to inform users about important information, successful actions, warnings, or errors. Alerts support different visual variants, optional icons, dismissible behavior via Alpine.js, and action slots for follow-up operations.

Use alerts for:

  • Form submission confirmations
  • Validation error summaries
  • System warnings and notices
  • Informational banners

Props

Prop Type Default Description
variant string 'info' Visual style: info, success, warning, danger
icon string|null null Custom icon name. Auto-selected from variant when null
dismissible bool false Show close button (uses Alpine.js x-show)
bordered bool true Add left border accent

Default icons per variant:

  • info -> info
  • success -> check-circle
  • warning -> alert-triangle
  • danger -> x-circle

Slots

Slot Description
Default Main alert body content
title Optional heading displayed above the body
actions Optional action buttons displayed below the body

See more examples and every variant in the Alert documentation.

Laravel-native
No JavaScript framework. Pure Blade, Livewire & Alpine.
Dark mode & themeable
Tailwind 4 CSS variables and a visual Theme Studio.
Accessible
WCAG 2.1 AA-minded, keyboard and ARIA support.