PHPackages                             rifrocket/filament-alert-box - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. rifrocket/filament-alert-box

ActiveLibrary[Templating &amp; Views](/categories/templating)

rifrocket/filament-alert-box
============================

A modern, customizable alert box plugin for FilamentPHP with render hooks support. Create beautiful alerts with a fluent, chainable API across 4 different layout types.

3.0.0(10mo ago)4175MITPHPPHP ^8.1CI passing

Since Jun 27Pushed 10mo agoCompare

[ Source](https://github.com/rifrocket/filament-alert-box)[ Packagist](https://packagist.org/packages/rifrocket/filament-alert-box)[ Docs](https://github.com/rifrocket/filament-alert-box)[ RSS](/packages/rifrocket-filament-alert-box/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (5)Used By (0)

[![Alert Box Plugin Banner](https://raw.githubusercontent.com/rifrocket/filament-alert-box/main/filament-alert-box.png)](https://raw.githubusercontent.com/rifrocket/filament-alert-box/main/filament-alert-box.png)

Alert Box
=========

[](#alert-box)

A modern, customizable alert box plugin for FilamentPHP with render hooks support. Create beautiful alerts with a fluent, chainable API across 4 different card styles.

[![Latest Version on Packagist](https://camo.githubusercontent.com/8abb1c504b6586154de1232212f3e8a16dde794dfa8097d0d7cb7190b7596be4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726966726f636b65742f66696c616d656e742d616c6572742d626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rifrocket/filament-alert-box)[![Total Downloads](https://camo.githubusercontent.com/a49ec8bf78d8ad45f5c16e318e54fba5fa23e393727ea8435ad018b6c9c463ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726966726f636b65742f66696c616d656e742d616c6572742d626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rifrocket/filament-alert-box)

Features
--------

[](#features)

- 🎨 **4 Beautiful Card Styles** - Banner, Card with Border, Modern Card, and Minimalist
- 🔗 **Fluent Chainable API** - `AlertBox::make('Title')->success()->modernCard()->show()`
- 🎯 **FilamentPHP Render Hooks** - Perfectly integrated with Filament's architecture
- 💾 **In-Memory Storage** - No database or session dependencies
- 🎭 **Auto-Hide &amp; Permanent** - Configure timeout or make alerts persistent
- 🎪 **Customizable Icons &amp; Colors** - Full control over appearance with 5 icon sizes (xs, s, m, lg, xl)
- ⚡ **Zero Configuration** - Works out of the box
- 📱 **Responsive Design** - Works on all screen sizes

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require rifrocket/filament-alert-box
```

Register the plugin in your Panel provider:

```
use RifRocket\FilamentAlertBox\AlertBoxPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            AlertBoxPlugin::make(),
        ]);
}
```

Optionally, publish the views:

```
php artisan vendor:publish --tag=alert-box-views
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use RifRocket\FilamentAlertBox\Facades\AlertBox;

// Simple success alert
AlertBox::make('Operation Successful')
    ->success()
    ->show();

// Error alert with description
AlertBox::make('Error Occurred')
    ->message('Something went wrong while processing your request.')
    ->danger()
    ->permanent()
    ->show();
```

### Card Styles

[](#card-styles)

Choose from 4 beautiful card styles:

```
// Style 1: Simple Banner (default)
AlertBox::make('Welcome')->success()->bannerStyle()->show();

// Style 2: Card with Border
AlertBox::make('Information')->info()->cardWithBorder()->show();

// Style 3: Modern Card
AlertBox::make('Warning')->warning()->modernCard()->show();

// Style 4: Minimalist
AlertBox::make('Update Available')->info()->minimalistStyle()->show();

// Or use the generic method
AlertBox::make('Custom')->success()->cardStyle(2)->show();
```

### Position-Based Methods

[](#position-based-methods)

Use position-specific methods to control WHERE alerts appear:

```
AlertBox::make('Header Alert')->success()->pageHeaderAfter()->show();
AlertBox::make('Sidebar Alert')->warning()->sidebarNavEnd()->show();
AlertBox::make('Topbar Alert')->info()->topBarStart()->show();
AlertBox::make('Footer Alert')->info()->footer()->show();
```

### Combining Style and Position

[](#combining-style-and-position)

Mix card styles with positions for complete control:

```
// Modern card in header position
AlertBox::make('Welcome')->success()->modernCard()->pageHeaderAfter()->show();

// Minimalist style in topbar
AlertBox::make('Quick Notice')->info()->minimalistStyle()->topBarStart()->show();

// Bordered card at page end
AlertBox::make('Done!')->success()->cardWithBorder()->pageEnd()->show();
```

### Alert Types

[](#alert-types)

```
// Success alerts
AlertBox::make('Success!')->success()->show();

// Error/Danger alerts
AlertBox::make('Error!')->danger()->show();
AlertBox::make('Error!')->error()->show(); // Alias for danger

// Warning alerts
AlertBox::make('Warning!')->warning()->show();

// Info alerts (default)
AlertBox::make('Information')->info()->show();
```

### Advanced Configuration

[](#advanced-configuration)

```
AlertBox::make('Custom Alert')
    ->message('This is the main message')
    ->description('Additional description text')
    ->icon('heroicon-o-check-circle')
    ->iconColor('#10b981')
    ->titleColor('#059669')
    ->success()
    ->modernCard() // Use modern card style
    ->pageHeaderAfter() // Position in header
    ->canBeClose(true)
    ->autoDisappear(10) // Auto-hide after 10 seconds
    ->classes('custom-alert-class')
    ->style('border: 2px solid red;')
    ->show();
```

### Auto-Hide vs Permanent

[](#auto-hide-vs-permanent)

```
// Auto-hide after 5 seconds
AlertBox::make('Auto Hide')
    ->success()
    ->autoDisappear(5)
    ->show();

// Permanent alert (user must close)
AlertBox::make('Important Notice')
    ->warning()
    ->permanent()
    ->show();

// Closeable control
AlertBox::make('Closeable Alert')
    ->info()
    ->canBeClose(false) // Cannot be closed by user
    ->show();
```

### Quick Static Methods

[](#quick-static-methods)

Convenience methods for rapid alert creation:

```
// Quick success alert
AlertBox::success('Operation completed successfully!')->show();

// Quick error alert
AlertBox::error('Something went wrong!')->show();

// Quick warning alert
AlertBox::warning('Please check your input.')->show();

// Quick info alert
AlertBox::info('Here is some information.')->show();

// Chain additional methods with quick methods
AlertBox::success('Data saved!')
    ->modernCard()
    ->autoDisappear(5)
    ->pageHeaderAfter()
    ->show();
```

API Reference
-------------

[](#api-reference)

### AlertBuilder Methods

[](#alertbuilder-methods)

MethodDescriptionExample`make(string $title = null)`Create new alert builder`AlertBox::make('Title')``title(string $title)`Set alert title`->title('Alert Title')``message(string $message)`Set alert message (alias for description)`->message('Alert message')``description(string $description)`Set alert description`->description('Alert description')``cardStyle(int $style)`Set card style (1-4)`->cardStyle(2)``bannerStyle()`Simple banner style`->bannerStyle()``cardWithBorder()`Card with border style`->cardWithBorder()``modernCard()`Modern card style`->modernCard()``minimalistStyle()`Minimalist style`->minimalistStyle()``icon(string $icon)`Set alert icon`->icon('heroicon-o-check')``noIcon(bool $state = true)`Disable alert icon`->noIcon()``iconColor(string $color)`Set icon color`->iconColor('#10b981')``iconSize(string $size)`Set icon size (xs, s, m, lg, xl)`->iconSize('lg')``iconXS()`Set extra small icon`->iconXS()``iconS()`Set small icon`->iconS()``iconM()`Set medium icon (default)`->iconM()``iconLG()`Set large icon`->iconLG()``iconXL()`Set extra large icon`->iconXL()``titleColor(string $color)`Set title color`->titleColor('#059669')``descriptionColor(string $color)`Set description color`->descriptionColor('#6b7280')``success()`Set as success alert`->success()``danger()`Set as danger alert`->danger()``error()`Alias for danger`->error()``warning()`Set as warning alert`->warning()``info()`Set as info alert`->info()``canBeClose(bool $closeable = true)`Set closeable`->canBeClose(false)``autoDisappear(int $seconds)`Auto-hide timeout`->autoDisappear(10)``permanent(bool $permanent = true)`Make permanent`->permanent()``classes(string $classes)`Add CSS classes`->classes('my-class')``style(string $style)`Add inline styles`->style('color: red;')``position(string $position)`Set custom position`->position('custom-hook')``renderHook(string $hook)`Set render hook`->renderHook(PanelsRenderHook::PAGE_START)``show()`Display the alert`->show()`### Position Methods

[](#position-methods)

MethodDescriptionHook`pageHeaderAfter()`After page header widgets`PAGE_HEADER_WIDGETS_AFTER``pageStart()`At page start`PAGE_START``sidebarNavEnd()`End of sidebar navigation`SIDEBAR_NAV_END``topbarStart()`Start of topbar`TOPBAR_START``pageEnd()`At page end`PAGE_END``footer()`In footer`FOOTER`### Manager Methods

[](#manager-methods)

```
use RifRocket\FilamentAlertBox\AlertBoxManager;

// Get alerts for position
$alerts = AlertBoxManager::getAlerts('position');

// Clear alerts for position
AlertBoxManager::clearAlerts('position');

// Clear all alerts
AlertBoxManager::clearAll();

// Get alert count
$count = AlertBoxManager::getAlertCount();
```

Card Style Previews
-------------------

[](#card-style-previews)

### Style 1: Simple Banner

[](#style-1-simple-banner)

Clean, simple banner-style alert with a colored left border. Perfect for basic notifications.

### Style 2: Card with Border

[](#style-2-card-with-border)

Enhanced card with a full border, more padding, and refined styling. Great for important messages.

### Style 3: Modern Card

[](#style-3-modern-card)

Premium card design with gradient top border, enhanced shadows, and sophisticated styling. Best for key announcements.

### Style 4: Minimalist

[](#style-4-minimalist)

Compact, clean design with minimal styling. Perfect for subtle notifications and inline messages.

Customization
-------------

[](#customization)

### Publishing Views

[](#publishing-views)

```
php artisan vendor:publish --tag=alert-box-views
```

The alert styles use Tailwind CSS utility classes exclusively. You can customize the appearance by publishing and modifying the Blade views at `resources/views/vendor/alert-box/`.

### Custom Icons

[](#custom-icons)

Use any Heroicon or custom icon with different sizes:

```
AlertBox::make('Custom Icon')
    ->icon('heroicon-o-star')
    ->iconSize('lg') // or ->iconLG()
    ->success()
    ->show();
```

### Icon Sizes

[](#icon-sizes)

Choose from 5 different icon sizes:

```
// Extra Small (3x3)
AlertBox::make('Minimal Alert')->iconXS()->info()->show();

// Small (4x4)
AlertBox::make('Small Alert')->iconS()->warning()->show();

// Medium (6x6) - Default
AlertBox::make('Normal Alert')->iconM()->success()->show();

// Large (8x8)
AlertBox::make('Important Alert')->iconLG()->danger()->show();

// Extra Large (10x10)
AlertBox::make('Critical Alert')->iconXL()->error()->show();
```

Requirements
------------

[](#requirements)

- PHP 8.1+
- FilamentPHP 3.0+
- Laravel 10.0+ or 11.0+

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Credits
-------

[](#credits)

- [Mohammad Arif](mailto:mohammad.arif9999@gmail.com)
- [All Contributors](../../contributors)

Support
-------

[](#support)

If you find this package helpful, please consider starring the repository!

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance54

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

318d ago

Major Versions

1.2.0 → 3.0.02025-06-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/0760d2ca4970ea58535ee77fa44041b71ed2b6e3ab898a3b930d7bccc1175d56?d=identicon)[mohammad\_arif](/maintainers/mohammad_arif)

---

Tags

laraveluinotificationbladetailwindadminalertfilament

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/rifrocket-filament-alert-box/health.svg)

```
[![Health](https://phpackages.com/badges/rifrocket-filament-alert-box/health.svg)](https://phpackages.com/packages/rifrocket-filament-alert-box)
```

###  Alternatives

[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[hasinhayder/tyro-login

Tyro Login - Beautiful, customizable authentication views for Laravel 12 &amp; 13

2362.2k2](/packages/hasinhayder-tyro-login)[electrik/slate

Slate - a Laravel Blade UI Kit is a set of anonymous blade components built using TailwindCSS v4 with built-in dark mode support for your next Laravel project

102.3k1](/packages/electrik-slate)[ddfsn/blade-components

Blade Components is a hand-crafted, UI component library for building consistent web experiences in Laravel apps.

193.1k](/packages/ddfsn-blade-components)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
