Build reactive components with Livewire 3, wire:model, actions, lifecycle hooks, Volt, and Folio. Use when creating interactive UI without JavaScript, forms, or real-time updates.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
After implementation, run fuse-ai-pilot:sniper for validation.
| Feature | Description |
|---|---|
| Components | Reactive PHP classes with Blade views |
| wire:model | Two-way data binding |
| Actions | Call PHP methods from frontend |
| Events | Component communication |
| Volt | Single-file components |
| Folio | File-based routing |
Component choice?
βββ Complex logic β Class-based component
βββ Simple page β Volt functional API
βββ Medium complexity β Volt class-based
βββ Quick embed β @volt inline
βββ File-based route β Folio + Volt
Binding type?
βββ Form fields β wire:model.blur
βββ Search input β wire:model.live.debounce.300ms
βββ Checkbox/toggle β wire:model.live
βββ Select β wire:model
βββ No sync β Local Alpine x-data
| Topic | Reference | When to Consult |
|---|---|---|
| Components | components.md | Creating components |
| Wire Directives | wire-directives.md | Data binding, events |
| Lifecycle | lifecycle.md | Hooks, mount, hydrate |
| Forms | forms-validation.md | Validation, form objects |
| Events | events.md | Dispatch, listen |
| Alpine | alpine-integration.md | $wire, @entangle |
| File Uploads | file-uploads.md | Upload handling |
| Nesting | nesting.md | Parent-child |
| Loading | loading-states.md | wire:loading, lazy |
| Navigation | navigation.md | SPA mode |
| Testing | testing.md | Component tests |
| Security | security.md | Auth, rate limit |
| Volt | volt.md | Single-file components |
| Topic | Reference | When to Consult |
|---|---|---|
| Folio | folio.md | File-based routing |
| Precognition | precognition.md | Live validation |
| Reverb | reverb.md | WebSockets |
| Template | When to Use |
|---|---|
| BasicComponent.php.md | Standard component |
| FormComponent.php.md | Form with validation |
| VoltComponent.blade.md | Volt patterns |
| DataTableComponent.php.md | Table with search/sort |
| FileUploadComponent.php.md | File uploads |
| NestedComponents.php.md | Parent-child |
| ComponentTest.php.md | Testing patterns |
class Counter extends Component
{
public int $count = 0;
public function increment(): void
{
$this->count++;
}
public function render()
{
return view('livewire.counter');
}
}
<?php
use function Livewire\Volt\{state};
state(['count' => 0]);
$increment = fn() => $this->count++;
?>
<button wire:click="increment">{{ $count }}</button>
<input wire:model.blur="email">
<input wire:model.live.debounce.300ms="search">
<button wire:click="save" wire:loading.attr="disabled">Save</button>
Livewire 4 est la version compatible Laravel 13. Changements clΓ©s :
wire:model.live rate-limited par dΓ©faut (300ms debounce implicite)#[Locked], #[Computed], #[On] toujours supportΓ©s/livewire/update gΓ©rΓ©es automatiquement, pas de config requisewire:poll.5s β toujours valide$this->dispatch('event') β toujours valide#[\Livewire\Attributes\Validate]) β API stable