Polyscope - The agent-first dev environment for Laravel

Laravel Livewire Wizard

spatie/laravel-livewire-wizard image

Laravel Livewire Wizard stats

Downloads
230.8K
Stars
299
Open Issues
0
Forks
39

View on GitHub →

Build wizards using Livewire

Build wizards using Livewire

This package offers lightweight Livewire components that allow you to easily build a wizard. With "wizard" we mean a multi-step process in which each step has its own screen.

Here's what a wizard component class could look like.

use Spatie\LivewireWizard\Components\WizardComponent;
 
class CheckoutWizardComponent extends WizardComponent
{
public function steps() : array
{
return [
CartStepComponent::class,
DeliveryAddressStepComponent::class,
ConfirmOrderStepComponent::class,
];
}
}

A step is class that extends StepComponent (which in its turn extends Livewire\Component). You can do anything in here that you can do with a regular Livewire component.

namespace App\Components;
 
class CartStepComponent extends StepComponent
{
// add any Livewire powered method you want
 
public function render()
{
return view('checkout-wizard.steps.cart');
}
}

You can easily control which step is displayed, access state of other steps, and build any navigation you desire.

In this repo on GitHub, you'll find a demo Laravel application that uses the laravel-livewire-wizard package to create a simple checkout flow.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Documentation

All documentation is available on our documentation site.

Testing

composer test

Alternatives

Our package is headless. This means that it does not provide UI, but it offers functions to easily build any UI you want. If you do not wish to build your own UI, you could consider using vildanbina/livewire-wizard, which includes pre-built navigation and CSS.

Filament users could also take a look at the built-in wizard functionality.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

spatie photo

We create open source, digital products and courses for the developer community

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Spatie Laravel Livewire Wizard Related Articles

Use Passkeys in Your Laravel App image

Use Passkeys in Your Laravel App

Read article
Laravel Cyber Deals image

Laravel Cyber Deals

Read article
Laravel Black Friday Deals image

Laravel Black Friday Deals

Read article
Learn how to upload files in Laravel like a Pro image

Learn how to upload files in Laravel like a Pro

Read article
Laravel Comments Package image

Laravel Comments Package

Read article
Laravel Jetstream: Add CRUD with Spatie Permission image

Laravel Jetstream: Add CRUD with Spatie Permission

Read article
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Typesense Search logo

Typesense Search

Typesense is an open source, blazing-fast search engine, optimized for helping you build delightful search experiences for your sites and apps. Natively integrated with Laravel Scout.

Typesense Search
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Tighten logo

Tighten

We help companies turn great ideas into amazing apps, products, and services.

Tighten
The Certification of Competence for Laravel logo

The Certification of Competence for Laravel

A community-driven, proctored assessment across 4 levels designed to validate real-world Laravel knowledge, from Junior to mastery-level Artisan. Official Vue.js, Official Nuxt, Angular, React, JS certifications also available.

The Certification of Competence for Laravel