Installation
composer require exonos/livewirestack
Publish the package assets (if needed):
php artisan vendor:publish --provider="Exonos\Livewirestack\LivewirestackServiceProvider" --tag="public"
First Use Case: Quick Form Integration
php artisan make:livewire UserProfile
InputText):
@livewireScripts
@livewireStyles
<x-livewirestack::input-text
wire:model="name"
label="Full Name"
placeholder="Enter your name"
/>
Rapid UI Assembly
Card, Modal, Dropdown) as drop-in replacements for vanilla Livewire/Alpine markup.<x-livewirestack::card title="User Settings">
<x-slot name="content">
<x-livewirestack::input-text wire:model="email" label="Email" />
</x-slot>
</x-livewirestack::card>
State Management
disabled, required).<x-livewirestack::button
type="submit"
:disabled="$processing"
wire:click="save"
>
Save
</x-livewirestack::button>
Dynamic Forms
wire:ignore and Alpine.js for dynamic fields.<div x-data="{ open: false }">
<x-livewirestack::button @click="open = true">Add Field</x-livewirestack::button>
<x-livewirestack::modal :open="open" @close="open = false">
<x-livewirestack::input-text wire:model="dynamicFields.{{ uuidv4() }}" label="Dynamic Field" />
</x-livewirestack::modal>
</div>
Theming
class prop or custom CSS.<x-livewirestack::button class="bg-blue-600 hover:bg-blue-700">Custom Theme</x-livewirestack::button>
Integration with Laravel Features
<x-livewirestack::auth-card>
<x-slot name="login">
<x-livewirestack::input-email wire:model="email" label="Email" />
<x-livewirestack::input-password wire:model="password" label="Password" />
</x-slot>
</x-livewirestack::auth-card>
Asset Conflicts
@vite or @stack directives to isolate assets:
@push('scripts')
@livewireScripts
@endpush
Livewire Property Binding
wire:model binding (e.g., wire:model.defer for laggy inputs).wire:model.lazy for non-critical fields to reduce server hits.Modal Z-Index
z-50 in your component:
<x-livewirestack::modal class="z-[100]">
Form Validation Styling
tailwind.config.js:
module.exports = {
theme: {
extend: {
colors: {
error: '#ef4444',
},
},
},
};
Component Props
{{ dd($this->props) }} in Livewire components to inspect passed props from Livewirestack components.Alpine.js Events
<div x-data @click="console.log('Clicked')">...</div>
Livewire Hooks
public function mounting()
{
\Log::info('Component mounted');
}
Custom Components
vendor/exonos/livewirestack/resources/views to resources/views/vendor/livewirestack.<!-- resources/views/vendor/livewirestack/input-text.blade.php -->
@extends('livewirestack::input-text')
@section('classes')
{{ parent::classes() }} custom-class
@endsection
Slot Overrides
x-slot to replace default content:
<x-livewirestack::card>
<x-slot name="header">
Custom Header
</x-slot>
</x-livewirestack::card>
JavaScript Extensions
x-init:
<x-livewirestack::dropdown x-data="{ open: false }" x-init="open = $wire.entering('dropdown-open')">
Server-Side Logic
updated* hooks to sync UI state:
public function updatedName()
{
$this->validate(['name' => 'required|min:3']);
}
How can I help you explore Laravel packages today?