A modern TALL stack component library built with Tailwind CSS v4, Livewire 3, and Alpine.js.
Install the package via Composer:
composer require stratos/spire-ui
Add the Blade directives to your layout file:
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
@spireStyles
@livewireStyles
</head>
<body>
{{ $slot }}
@spireScripts
@livewireScripts
</body>
</html>
That's it! No npm install, no build step required. Start using components immediately:
<x-spire::button>Click me</x-spire::button>
Publish the admin layout for a complete starting point:
php artisan vendor:publish --tag=spire-ui-layouts
This creates resources/views/components/layouts/admin.blade.php with a full sidebar + header layout.
For projects that need to customize or bundle Spire UI with their own assets:
In your resources/css/app.css:
@import 'tailwindcss';
@import '../../vendor/stratos/spire-ui/resources/css/index.css';
In your resources/js/app.js:
import { initializeSpireUI } from '../../vendor/stratos/spire-ui/resources/js/index';
initializeSpireUI();
npm run build
<head>
@vite(['resources/css/app.css', 'resources/js/app.js'])
@livewireStyles
</head>
<body>
{{ $slot }}
@livewireScripts
</body>
| Directive | Description |
|---|---|
@spireStyles |
Outputs CSS link tag for all Spire UI styles |
@spireScripts |
Outputs JS script tags and initializes Alpine components |
Publish the configuration file to customize component defaults:
php artisan vendor:publish --tag=spire-ui-config
This creates config/spire-ui.php where you can customize:
prefix - Component prefix (default: spire)asset_route - Route path for serving assets (default: spire-ui)theme.dark_mode - Dark mode strategydefaults - Global component defaults (size, radius, placement)SPIRE_UI_PREFIX=spire
SPIRE_UI_ASSET_ROUTE=spire-ui
SPIRE_UI_DARK_MODE=class
Components use the configured prefix (default: spire):
<x-spire::button>Click me</x-spire::button>
<x-spire::input label="Name" />
<x-spire::select :options="$options" />
Spire UI uses folder-based components with dot notation:
<x-spire::dropdown /><x-spire::dropdown.item />Spire UI uses semantic color tokens with automatic light/dark mode support.
primary, primary-hover, primary-active, primary-foregroundsecondary, secondary-hover, secondary-active, secondary-foregroundbody, surface, overlay (elevation hierarchy)text, text-muted, text-disabledborder, border-hover, border-focussuccess, error, warning, info (each with -hover, -bg, -foreground)Three-layer elevation system:
| Layer | Light Mode | Dark Mode | Usage |
|---|---|---|---|
body |
neutral-50 | neutral-950 | Page background |
surface |
white | neutral-900 | Cards, panels |
overlay |
neutral-100 | neutral-800 | Modals, dialogs |
<body class="bg-body text-text">
<div class="bg-surface border border-border rounded-lg p-6">
Card content
</div>
</body>
Publish the theme CSS file:
php artisan vendor:publish --tag=spire-ui-css
Edit resources/css/spire-ui-theme.css to customize colors.
Spire UI supports English, French, and Arabic. Set your application locale:
// config/app.php
'locale' => 'en', // or 'fr', 'ar'
Publish translations for customization:
php artisan vendor:publish --tag=spire-ui-lang
| Tag | Description |
|---|---|
spire-ui-config |
Configuration file |
spire-ui-views |
All component views |
spire-ui-lang |
Translation files |
spire-ui-css |
Theme CSS file |
spire-ui-layouts |
Layout components |
php artisan vendor:publish --tag=spire-ui-config
Contributions are welcome! Please read our Contributing Guide and Code of Conduct.
MIT License
How can I help you explore Laravel packages today?