Welcome to the course on building modals with Livewire! In this first episode, I give you an overview of what we'll be creating. We're aiming to set up a flexible modal system where you can use one modal design but inject any Livewire component you like, so you get all of Livewire's power inside your modals. We'll use Alpine.js for triggering modals anywhere in our app.
I start out by demoing what we'll build: opening modals, closing them by clicking outside or pressing Escape, and even stacking modals on top of each other. You'll see that everything in your Livewire components keeps working inside the modal, and I'll show this off with a simple counter as a preview.
Another cool feature we'll cover later is programmatically closing modals when something happens—like after submitting a form. For now, you'll see an example where the modal closes automatically when the counter hits 10.
So that's the plan! In the next episode, we'll get started by setting up our first modal, and as we go, we'll keep adding all these advanced features. Let's dive in!