Introducing wire:current in Livewire

Heyyyyyyyyy,

This morning, I released a new version of Livewire (3.5.13) with a new feature I've been cooking up.

Let me introduce you to "wire:current":

Basically, it's the easiest way I could possibly think of to style a link that matches the current page URL.

This started as something I needed when persisting sidebar navs between page nagivations using wire:navigate, but has become something I think I'll be using for all navigation, everywhere.

I always find myself fiddling with things like request()->is():

But first, I always have to look it up, and second, it always seems to behave slightly differently than I want it to for things like named routes and such.

So yeah, wire:current. A super clean, easy, way to just plop some CSS classes on an "a" tag if it's href matches the current URL path. Dig it.

Check out the wire:current docs →

Oh, also Livewire screencasts are 50% off if you want those and haven't bought them already:

Get Livewire 3 screencasts half off →

Thanks for using Livewire, appreciate cha,

-Caleb

Comments

Popular posts from this blog

🥳 Flux UI is now live!

C# lists, Regression Testing, and much more!

New Livewire Data Tables series is here!