stratos / spire-ui
A modern TALL stack component library with Tailwind v4, Livewire 3, and Alpine.js
Installs: 28
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 6
Language:Blade
pkg:composer/stratos/spire-ui
Requires
- php: ^8.3
- illuminate/support: ^12.0
- livewire/livewire: ^3.0
- symfony/process: ^7.0
- dev-master
- 1.1.24
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.20
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.8
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.5
- v1.0.4
- v1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- v1.0.0-alpha
- dev-main
- dev-dependabot/npm_and_yarn/oddbird/css-anchor-positioning-0.8.0
- dev-dependabot/npm_and_yarn/oddbird/css-anchor-positioning-0.7.0
- dev-dependabot/npm_and_yarn/oddbird/popover-polyfill-0.6.1
- dev-dependabot/github_actions/actions/setup-node-6
- dev-dependabot/github_actions/actions/checkout-5
- dev-dependabot/github_actions/actions/upload-pages-artifact-4
- dev-dependabot/github_actions/actions/configure-pages-5
- dev-dependabot/github_actions/github/codeql-action-4
This package is auto-updated.
Last update: 2025-11-26 13:56:10 UTC
README
A modern TALL stack component library built with Tailwind CSS v4, Livewire 3, and Alpine.js.
Features
- Modern Stack: Built on the TALL stack (Tailwind v4, Alpine.js, Laravel 12, Livewire 3)
- Zero Config: Pre-built assets served via Blade directives - no build step required
- Accessible: Full keyboard navigation, ARIA attributes, and semantic HTML
- Themeable: Semantic color tokens with built-in light/dark mode support
- Localized: i18n support for English, French, and Arabic
- Composable: Highly flexible components using Blade slots and attributes
Installation
Install the package via Composer:
composer require stratos/spire-ui
Quick Start (Zero Config)
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>
Using the Pre-built Layout
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.
Advanced Setup (Custom Bundling)
For projects that need to customize or bundle Spire UI with their own assets:
1. Import CSS
In your resources/css/app.css:
@import 'tailwindcss'; @import '../../vendor/stratos/spire-ui/resources/css/index.css';
2. Import JavaScript
In your resources/js/app.js:
import { initializeSpireUI } from '../../vendor/stratos/spire-ui/resources/js/index'; initializeSpireUI();
3. Build Assets
npm run build
4. Use Vite in Layout
<head> @vite(['resources/css/app.css', 'resources/js/app.js']) @livewireStyles </head> <body> {{ $slot }} @livewireScripts </body>
Blade Directives
| Directive | Description |
|---|---|
@spireStyles |
Outputs CSS link tag for all Spire UI styles |
@spireScripts |
Outputs JS script tags and initializes Alpine components |
Configuration
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)- Component-specific settings
Environment Variables
SPIRE_UI_PREFIX=spire SPIRE_UI_ASSET_ROUTE=spire-ui SPIRE_UI_DARK_MODE=class
Usage
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" />
Component Naming Convention
Spire UI uses folder-based components with dot notation:
- Parent component:
<x-spire::dropdown /> - Child component:
<x-spire::dropdown.item />
Theming
Spire UI uses semantic color tokens with automatic light/dark mode support.
Available Tokens
- Primary:
primary,primary-hover,primary-active,primary-foreground - Secondary:
secondary,secondary-hover,secondary-active,secondary-foreground - Surfaces:
body,surface,overlay(elevation hierarchy) - Text:
text,text-muted,text-disabled - Borders:
border,border-hover,border-focus - States:
success,error,warning,info(each with-hover,-bg,-foreground)
Surface Elevation Hierarchy
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>
Customizing Theme
Publish the theme CSS file:
php artisan vendor:publish --tag=spire-ui-css
Edit resources/css/spire-ui-theme.css to customize colors.
Localization
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
Publishing Assets
| 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
Contributing
Contributions are welcome! Please read our Contributing Guide and Code of Conduct.
License
MIT License