Sapphire Theme
Modern, glassmorphic notification system
Configuration
Setting as Default in Laravel
// config/flasher.php
return [
'default' => 'theme.sapphire',
'themes' => [
'sapphire' => [
'scripts' => [
'/vendor/flasher/themes/theme.sapphire.min.js',
],
'styles' => [
'/vendor/flasher/themes/theme.sapphire.min.css',
],
],
],
];
Theme Usage
flash()->success('Your changes have been saved!');
flash()->use('theme.sapphire')->success('This uses Sapphire Theme');
Key Features
Visual Design
Accessibility
Customization
CSS Variables
:root {
/* Base appearance */
--sapphire-bg-base: rgba(30, 30, 30, 0.9); /* Base background color */
--sapphire-text: #f0f0f0; /* Text color */
--sapphire-shadow: rgba(0, 0, 0, 0.15); /* Shadow color */
--sapphire-border-radius: 12px; /* Corner roundness */
--sapphire-blur: 12px; /* Backdrop blur amount */
/* Progress bar colors */
--sapphire-progress-bg: rgba(255, 255, 255, 0.2); /* Progress background */
--sapphire-progress-fill: rgba(255, 255, 255, 0.9); /* Progress fill */
/* Notification type colors */
--sapphire-success: rgba(16, 185, 129, 0.95); /* Success color */
--sapphire-error: rgba(239, 68, 68, 0.95); /* Error color */
--sapphire-warning: rgba(245, 158, 11, 0.95); /* Warning color */
--sapphire-info: rgba(59, 130, 246, 0.95); /* Info color */
}
HTML Structure
<div class="fl-sapphire fl-[type]" role="[role]" aria-live="[ariaLive]" aria-atomic="true">
<div class="fl-content">
<span class="fl-message">Message text</span>
</div>
<div class="fl-progress-bar">
<div class="fl-progress"></div>
</div>
</div>