stratosdigital / strata-ui
A comprehensive Laravel Blade component library built with Tailwind CSS v4, Alpine.js, and full Livewire integration
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: ^8.2
- blade-ui-kit/blade-heroicons: ^2.0
- blade-ui-kit/blade-icons: ^1.5
- illuminate/support: ^11.0|^12.0
- laravel/framework: ^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^9.0
- pestphp/pest: ^3.0
This package is auto-updated.
Last update: 2025-08-25 01:50:02 UTC
README
A comprehensive Laravel Blade component library built with Tailwind CSS v4, Alpine.js, and full Livewire integration. Strata UI provides modern, accessible, and customizable UI components for Laravel applications with zero configuration required.
Features
- ๐จ Modern Design System - Built with Tailwind CSS v4 and semantic color tokens
- ๐ Dark Mode Support - Automatic dark mode with comprehensive theme coverage
- โก Alpine.js Integration - Interactive components with smart plugin loading
- ๐ Livewire Compatible - Full
wire:model
support and event integration - โฟ Accessibility First - ARIA labels, keyboard navigation, and screen reader support
- ๐ฑ Responsive Design - Mobile-first approach with consistent breakpoints
- ๐ฏ Type Safe - PHP 8+ with proper type declarations and return types
- ๐งช Fully Tested - Comprehensive test coverage with Pest
Requirements
- PHP 8.2+
- Laravel 11+ (or Laravel 12)
- Tailwind CSS v4 (required - v3 not supported)
- Node.js 18+ (for asset compilation)
Installation
1. Install the Package
composer require stratosdigital/strata-ui
2. Publish Assets (Optional)
If you want to customize the theme or extend the package:
php artisan vendor:publish --tag=strata-ui-assets php artisan vendor:publish --tag=strata-ui-views
3. Add Strata Scripts
Add the Strata scripts directive to your main layout file:
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <!-- Your head content --> @vite(['resources/css/app.css', 'resources/js/app.js']) </head> <body> <!-- Your body content --> <!-- Add this before closing body tag --> @strataScripts </body> </html>
4. Configure Tailwind CSS v4
Add Strata UI paths to your CSS file using Tailwind v4's @source
directive:
/* resources/css/app.css */ @import "tailwindcss"; /* Add Strata UI template paths */ @source "../../vendor/stratosdigital/strata-ui/resources/views/**/*.blade.php";
5. Import Strata Theme (Optional)
If you want to use Strata's design system, import the theme in your main CSS file:
/* resources/css/app.css */ @import "tailwindcss"; /* Add Strata UI template paths */ @source "../../vendor/stratosdigital/strata-ui/resources/views/**/*.blade.php"; /* Import Strata UI theme (optional) */ @import "../../vendor/stratosdigital/strata-ui/resources/css/strata-theme.css";
Basic Usage
Once installed, you can use Strata UI components with the x-strata::
prefix:
<!-- Button --> <x-strata::button>Click Me</x-strata::button> <!-- Form Input --> <x-strata::form.input name="email" label="Email Address" placeholder="Enter your email" /> <!-- Rating Component --> <x-strata::form.rating name="rating" label="Rate this product" value="4" clearable /> <!-- Modal --> <x-strata::modal name="example"> <h2>Modal Title</h2> <p>Modal content goes here...</p> </x-strata::modal>
Livewire Integration
All form components support Livewire out of the box:
<!-- In your Livewire component view --> <x-strata::form.input wire:model="email" label="Email" placeholder="Enter email" /> <x-strata::form.rating wire:model="rating" label="Product Rating" :max="5" /> <x-strata::form.select wire:model="category" :items="$categories" label="Category" searchable />
Component Categories
Core UI Components
button
- Buttons with multiple variants and sizesbadge
- Status indicators and labelsalert
- Contextual messagingcard
- Container componentavatar
- User profile pictures and initials
Form Components (form.*
)
input
- Text inputs with icons and validationtextarea
- Multi-line text inputselect
- Dropdown selection with searchcheckbox
- Checkbox inputsradio
- Radio button inputstoggle
- Switch/toggle inputsrating
- Star rating componentfile-upload
- File upload with drag & dropgroup
- Form field wrapper with labels and errors
Advanced Components
modal
- Modal dialogs with Alpine.jstable
- Data tables with sorting and paginationcalendar
- Date picker and range selectiontoast
- Notification systemtooltip
- Hover-triggered tooltipstabs
- Tabbed content areas
Configuration
Environment Variables
The package respects standard Laravel configurations:
APP_TIMEZONE=UTC APP_LOCALE=en
Customizing the Theme
If you published the assets, you can customize the theme by editing:
resources/css/strata-theme.css
The theme uses CSS custom properties for easy customization:
:root { --primary: oklch(0.6104 0.0767 299.7335); --accent: oklch(0.7889 0.0802 359.9375); --rating-star: oklch(0.7540 0.0982 76.8292); --background: oklch(0.9777 0.0041 301.4256); /* ... other variables */ }
Asset Compilation
If you need to customize JavaScript functionality:
# Install dependencies npm install # Build for development npm run dev # Build for production npm run build
Testing
Run the component tests:
# Run all tests php artisan test # Run only Strata UI tests php artisan test --filter=Strata # Run specific component tests php artisan test tests/Feature/RatingComponentTest.php
Development
For package development and contributing, see DEVELOPMENT.md for detailed patterns and conventions.
Browser Support
- Chrome (latest 2 versions)
- Firefox (latest 2 versions)
- Safari (latest 2 versions)
- Edge (latest 2 versions)
Contributing
- Fork the repository
- Create a feature branch
- Follow the patterns in DEVELOPMENT.md
- Add tests for new components
- Submit a pull request
License
Strata UI is open-sourced software licensed under the MIT license.
Credits
- Built with Alpine.js
- Styled with Tailwind CSS
- Icons by Heroicons
- Inspired by modern design systems and Laravel ecosystem best practices