Download the PHP package la-souris/filament-state-stepper without Composer
On this page you can find all versions of the php package la-souris/filament-state-stepper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download la-souris/filament-state-stepper
More information about la-souris/filament-state-stepper
Files in la-souris/filament-state-stepper
Package filament-state-stepper
Short Description Filament v5 infolist component for Spatie ModelStates with transition-aware step ordering and status-aware labels.
License MIT
Informations about the package filament-state-stepper
Filament State Stepper
A Filament v5 infolist component that renders Spatie ModelStates as a visual step indicator. It automatically derives step order from AllowTransition attributes, resolves labels and icons from Filament contracts, and supports status-aware coloring for completed, current, upcoming, and error states.
Requirements
- PHP 8.5+
- Filament v5
- Spatie Laravel Model States v2
Installation
Register the plugin in your Filament panel provider:
Usage
With Spatie ModelStates
Pass your state base class to stateClass(). The component will automatically resolve the step order from AllowTransition attributes, starting at the DefaultState, and derive labels and icons from HasLabel and HasIcon contracts.
With manual options
Status-aware labels
Implement the HasStepperLabel contract on your state classes to display different labels depending on step status:
Customizing colors
Hiding states
Conditionally hide steps from the visual display:
How step ordering works
The component reads AllowTransition attributes from the state base class and builds a directed graph. Starting from the DefaultState, it walks the graph preferring non-terminal states (the "happy path") first. Terminal states (those without outgoing transitions) are appended at the end. When a terminal state is the current state, it displays as "completed" rather than "current".
Testing
Credits
Inspired by aureuserp/progress-stepper.
License
MIT. See LICENSE for details.
All versions of filament-state-stepper with dependencies
filament/support Version ^5.6
filament/infolists Version ^5.0
spatie/laravel-model-states Version ^2.0
spatie/laravel-package-tools Version ^1.16