livewire-4
БесплатноБез исполняемых скриптовНе проверенBuild Livewire 4 components and applications. Use when creating reactive Laravel interfaces, single-file components, multi-file components, page components…
от freekmurze★ 1 019 звёзд на GitHubОб этом скилле
Livewire 4
Build dynamic, reactive interfaces with PHP — no JavaScript required.
Component Formats
Single-file (default, recommended)
<?php // resources/views/components/⚡todos.blade.php
use Livewire\Component;
new class extends Component {
public $todos = [];
public $todo = '';
public function add()
{
$this->todos[] = $this->todo;
$this->reset('todo');
}
};
?>
<div>
<input type="text" wire:model="todo">
<button wire:click="add">Add</button>
@foreach ($todos as $item)
<li wire:key="{{ $loop->index }}">{{ $item }}</li>
@endforeach
</div>
Multi-file (for complex components)
php artisan make:livewire post.create --mfc
Creates: resources/views/components/post/⚡create/ with separate .php, .blade.php, .js, .css files.
Page components
php artisan make:livewire pages::post.create
Route with: Route::livewire('/posts/create', 'pages::post.create');
Core Patterns
Properties
- Public properties auto-available in Blade
- Use
$this->reset('prop')to reset - Use
$this->fill([...])for bulk assignment - Protected properties hidden from client (not persisted)
Data Binding
<input wire:model="title"> <!-- Syncs on action -->
<input wire:model.live="search"> <!-- Syncs on input -->
<input wire:model.blur="email"> <!-- Syncs on blur -->
Actions
<button wire:click="save">Save</button>
<button wire:click="delete({{ $id }})">Delete</button>
<form wire:submit="store">...</form>
Computed Properties
use Livewire\Attributes\Computed;
#[Computed]
public function posts()
{
return Post::latest()->get();
}
Access in Blade: $this->posts
Event Modifiers
wire:click.prevent- preventDefaultwire:keydown.enter- specific keywire:click.debounce.500ms- debouncewire:submit.throttle- throttle
Loading States
<button wire:click="save" class="data-loading:opacity-50">
Save
</button>
<span class="not-data-loading:hidden">Saving...</span>
Confirmation
<button wire:click="delete" wire:confirm="Are you sure?">Delete</button>
Security
Always validate and authorize — public properties can be manipulated client-side.
public function delete(Post $post)
{
$this->authorize('delete', $post);
$post->delete();
}
Detailed References
Load these as needed:
- Components deep dive: See
references/components.md - Properties & state: See
references/properties.md - Actions & events: See
references/actions.md
Установить livewire-4 в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл livewire-4?
Build Livewire 4 components and applications. Use when creating reactive Laravel interfaces, single-file components, multi-file components, page components, forms, actions, or any Livewire-based UI. Triggers include "Livewire component", "wire:model", "wire:click", building interactive Laravel UIs, or working with Livewire 4 projects.
Как установить скилл livewire-4?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл livewire-4 запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic