- How do I create a multi-step form wizard in Laravel using Livewire 3?
- Install the package via Composer (`composer require satoved/laravel-livewire-steps`), extend `WizardComponent`, and define each step as a `StepForm` class. Declare steps as public properties in your wizard component to control the flow. The package handles step transitions automatically.
- Does this package work with Laravel 13 and Livewire 3?
- Yes, this package is officially designed for Laravel 13 and Livewire 3. It leverages Livewire 3’s form objects and modern Laravel features like PHP 8.2+. Ensure your project meets these requirements for seamless integration.
- Can I customize the UI of the wizard steps beyond basic styling?
- The package provides a lightweight abstraction, so UI customization requires manual overrides in Blade or Livewire. For advanced animations or transitions, you’ll need to extend the default rendering logic or use client-side JavaScript alongside Livewire.
- How do I validate data across all wizard steps globally?
- The package handles step-specific validation natively, but global validation must be implemented manually. You can add a `validateAll()` method in your `WizardComponent` to run validation rules across all steps before submission.
- Is there built-in support for persisting wizard state beyond the session?
- No, the package relies on Livewire’s session-based state management. For long-running wizards (e.g., multi-day processes), you’ll need to integrate external solutions like database storage or cache to persist data.
- Will this work with Laravel 10 or 11 if I adjust the code?
- While the package officially supports Laravel 13, it may work with Laravel 10/11 with minor adjustments. Test thoroughly, especially if using newer Livewire 3 features. Check the changelog for compatibility notes.
- Can I use this package with Inertia.js or Alpine.js instead of Livewire?
- No, this package is tightly coupled to Livewire 3. It won’t work with Inertia.js or Alpine.js directly. If you need a frontend-agnostic solution, consider alternatives like custom Blade templates or client-side frameworks.
- How do I migrate from spatie/laravel-livewire-wizard to this package?
- Both packages follow similar principles, but this one uses Livewire 3 form objects. Wrap your existing steps in `StepForm` classes and integrate them into a `WizardComponent`. The migration is straightforward if you’re already using Livewire 3.
- Are there performance concerns with large wizards or many steps?
- Livewire’s session state can grow with large forms, potentially impacting memory. Optimize by using `wire:ignore` for non-reactive elements, lazy-loading steps, or offloading data to external storage.
- Does this package support conditional logic or skipping steps?
- Yes, you can implement conditional logic by overriding methods in `WizardComponent` or `StepForm`. To skip steps, use the `skipStep()` method or modify the step order dynamically in your component logic.