A FIELD GUIDE TO LARAVEL · VOLUME II · THE ECOSYSTEM
ENTRY II.31 · SINGLE-FILE COMPONENTS
Volt
Livewire\Volt · Package · first recorded 26 July 2023, v1.0.0-beta.1 on Packagist
A single-file form for Livewire: the PHP and the Blade of a component in one file, written as functions (state, mount, computed) or as an anonymous class. The functional API compiles to an ordinary Livewire class component.
Specification
Kind Package on Livewire, in-process; a compiler for one-file components
Interface state(), mount(), computed(), rules(), on(); or new class extends Component
Client Livewire's JavaScript in the browser; nothing extra to ship
Installed by composer require livewire/volt · volt:install
Voice make:volt (--class · --test · --pest)
Scales by Mounted directories; resources/views/livewire and pages by default
Range Cloud: yes. Blade files, nothing resident
Forge, VPS: yes, the same files
Vapor: yes, the same; needs no process
Neighbours
Livewire 4 makes single-file components its default format, so new code rarely needs Volt; Volt's main page sits in the Livewire 3.x docs. Folio routes the pages, and the Volt docs show state taken from Folio's route model binding. Volt's distinction is the functional API, which compiles to an ordinary class.
Field marks
livewire/volt in composer.json
app/Providers/VoltServiceProvider.php
use function Livewire\Volt\state
@volt('name') ... @endvolt
Fig. II.31.1 · one file, both halves, exploded
Parts
1 The file. resources/views/livewire/counter.blade.php, made by make:volt counter; a PHP block above the Blade.
2 state(). state(['count' => 0]); modifiers ->locked(), ->reactive(), ->modelable() and ->url() on a property.
3 Lifecycle and actions. mount(), boot(), updated(); $increment = fn () => $this->count++; computed() can ->persist().
4 Compiler. The functions compile to a Livewire class component, so everything Livewire does still applies.
5 Class form. The same file with new class extends Component; attributes such as #[Layout] go after new.
6 Render. <livewire:counter />, Volt::route('/users', 'user-index') for a full page, or @volt inside any Blade view.
Hidden joinery
A property can be ->locked() so the browser cannot tamper with it, or ->url() so it reads from the query string. computed()->persist() caches across requests, not just one render. An action ->renderless() skips the re-render. Volt::test('users.stats') reaches a nested component by dot notation.
Every line checked against the Volt 3.x docs, Livewire 4 docs, Volt source and Packagist on 2026-10-08.
TITLE
Volt · one file, both halves
SOURCES
livewire.laravel.com/docs/3.x/volt · livewire.laravel.com/docs/4.x/quickstart · livewire.laravel.com/docs/4.x/components · github.com/livewire/volt/blob/main/stubs/VoltServiceProvider.stub · packagist.org/packages/livewire/volt · laravel.com/docs/13.x/folio
STATUS
Verified · 2026-10-08
SHEET
II.31 of 48
REV
A · 2026-10-08
DRAWN
BS
FINISH
All faces, including the back