Reference
The tables that answer “what is it called, and what is the default”.
#[livewire(validate(required, max_length(255)))]
pub name: String,
#[livewire(url(as = "q", use = "replace"))]
pub search: String,
#[livewire(model)]
pub post: ModelRef<Post>,Every attribute in the tables has a working example on this site; this frame renders one of them.
Commands
| Command | What it does |
|---|---|
make:livewire <name> | Writes a component and its view. Options: --class, --sfc (default), --mfc, --inline, --js, --css, --test, --force, --path. |
livewire:make <name> | Alias of make:livewire, same options. |
livewire:config | Prints the resolved LivewireConfig. |
livewire:layout <name> | Writes a layout a page component can extend. |
livewire:convert <name> | Converts between the single-file and module-plus-view forms; --remove-view deletes the leftover view. |
livewire:publish [--assets] | Copies the runtime and stubs into public/vendor/livewire; the server then serves the published build. |
livewire:stubs | Writes the stubs make:livewire copies, so an application can change them. |
livewire:configure-s3-upload-cleanup | Reports the upstream not-an-S3-disk error on the local disk; the bucket-lifecycle branch is unsupported here, and the local directory is pruned by the schedule instead. |
Configuration
The section is a LivewireConfig. Without one, LivewireConfig::of returns these defaults.
| Field | Default | Meaning |
|---|---|---|
component_locations | resources/views/components, resources/views/livewire | directories searched for component views, in order |
component_namespaces | layouts → resources/views/layouts; pages → resources/views/pages | namespaces that resolve against a directory |
component_layout | layouts::app | the view that wraps a page component |
component_placeholder | None | the view a lazy component shows; None uses the built-in placeholder |
make_command | kind: Sfc, emoji: true, others false | the defaults of make:livewire |
component_path | src/livewire | where generated modules go |
view_path | resources/views/livewire | where generated views go |
temporary_file_upload | rules required, file, max:12288; 16 preview extensions; 5 minutes; cleanup on | how temporary uploads are stored, validated, previewed, and expired |
render_on_redirect | false | whether a redirecting component renders before the redirect |
legacy_model_binding | false | whether wire:model may bind a model directly |
inject_assets | true | whether HTML responses get the runtime injected |
navigate | progress bar on, #2299dd | how wire:navigate presents a visit |
inject_morph_markers | true | morph comments around conditionals and loops |
smart_wire_keys | true | derived keys for components inside loops |
pagination_theme | Tailwind | the CSS framework the pagination views target |
release_token | "a" | the token a redeployment changes, which expires old snapshots |
csp_safe | false | serve and run the CSP-safe build |
asset_url | None | a base URL for the runtime, when it is not served by the application |
update_uri | None | a path for the update endpoint other than the default |
payload.max_size | 1048576 | bytes of request body; None disables the guard |
payload.max_nesting_depth | 10 | property path depth |
payload.max_calls | 50 | method calls per request |
payload.max_components | 200 | components per request |
Endpoints
Every path starts with a prefix derived from the application key: /livewire- and the first eight hex characters of SHA-256(app key + "livewire-endpoint"). The pages never hard-code it; the snapshot and the script configuration carry it.
| Path | Method | Purpose |
|---|---|---|
{prefix}/update | POST | the update endpoint |
{prefix}/upload-file | POST | a temporary upload |
{prefix}/preview-file/{filename} | GET | a temporary file whose kind may be previewed |
{prefix}/livewire.js, livewire.min.js, livewire.csp.min.js, and their .map files | GET | the browser runtime |
{prefix}/js/{component}.js | GET | a component's JavaScript module |
{prefix}/css/{component}.css | GET | a component's scoped style module |
{prefix}/css/{component}.global.css | GET | a component's global style module |
Statuses
| Status | When |
|---|---|
| 404 | no X-Livewire header, a body that is not JSON, a malformed component, call, or snapshot, an update from another origin, a retired release token on a custom endpoint |
| 419 | a failed checksum, a release-token mismatch, an unknown or forbidden action, an update to a locked property, a typed hydration failure |
| 429 | the checksum-failure allowance is spent: Too many invalid Livewire requests. Please try again later. |
| 500 | an unknown component or synthesizer, an unknown property, or a payload, component-count, call-count, or nesting-depth guard |
| 401 | an upload endpoint with an invalid signature |
| 403 | a signed temporary-file reference that does not hold, or a denied action |
| 422 | an upload that breaks its rules |
Testing
The harness mounts a component, runs it, and asserts on the result. The assertions that exist:
| Assertion | Checks |
|---|---|
assert_set(path, value) | a property after an update, at a dot path |
assert_see(text) / assert_dont_see(text) | the rendered HTML |
assert_dispatched(event) | a browser event in the effects |
assert_redirected_to(url) | a redirect effect |
For anything else, animate the real endpoint: GET the page, read wire:snapshot out of the HTML, and POST an update with the X-Livewire header. That path never skips the checksum.
Directives in the browser
The runtime is upstream's, unchanged, so its directives behave as upstream documents them. They are client features: the server never sees them.
| Directive | Effect |
|---|---|
wire:model, .live, .blur, .change, .debounce | two-way binding, with modifiers |
wire:click, wire:submit | dispatch an action |
wire:show, wire:text, wire:bind | reactive display without a request |
wire:loading, wire:dirty, wire:offline | state of the pending or failing request |
wire:poll, wire:init, wire:intersect, wire:sort | timed, immediate, viewport, and drag interactions |
wire:transition, wire:cloak, wire:ignore, wire:replace | animation and DOM control |
wire:navigate, wire:current, wire:confirm | navigation and confirmation |
wire:ref, wire:stream, wire:key | references, streamed regions, stable identity |
Feature matrix
The authoritative list is STATUS.md in the repository. The overview page states it in
first-class form: what is included, what
is missing, the order to close it, and what
differs from PHP by design. The matrix:
| Area | State |
|---|---|
| Protocol: snapshots, checksum, release tokens, limits, error statuses | done |
| Components: derive, attributes, lifecycle, actions, validation, events, effects | done |
| Composition: nesting, slots, reactive props, modelable, lazy, islands, modules, SFC | done |
| Uploads, previews, streaming, cleanup schedule | done |
| Pages, route context, origin check, persistent guards | done |
| Model references, pagination, computed properties | done behind database |
Form objects: a nested struct with #[livewire(form)] | done; the client updates field.subfield paths |
livewire:form and livewire:attribute generators | absent; see STATUS.md |
| S3 storage | absent; the cleanup command says so |