Should I be using Select2 with Laravel and Tailwind or is there a more native Livewire alternative?

I have a Laravel Project that uses Tailwind styling.

I require select2 two functionality

  • It’s a huge dropdown with 100s of records so selecting via a normal dropdown is not possible
  • Select2 provides search functionality
  • Select2 provides extensibility so with the append method I can cater for “Add New Item”

I’m a noob and something I don’t understand is to get Select2 working I have to use wire:ignore, does it mean I also forgo wire:model?

Then styling seems to be an issue. Select2’s styling doesn’t seem to gell with Tailwind so well.

My question is what does the Laravel community use that uses Tailwind and Livewire? Is Select2 the way to go, or is there something more “native”?

There is a good package for searchable select using tailwind.Link

1 Like

Hey, @eugenevdm

@presleyd published a component, make sure to check it out

The Original Thread

1 Like

@mlayah thanks so much! This conforms to my main requirement that it also needs to have Tailwind styling. I’d actually been struggling for a few days before I saw this post so kind of managed to cobble something together. Gosh was a rapid course in Livewire and Tailwind (and even some Alpine) it is!

1 Like

Yes, this was much easier to style than select2!

Really love this component, but I get error in my project, the validation always running/show before I select a value from the dropdown (I use real time validation)

and dispatchBrowserEvent() for notification not working…