Package

Drpshtiwan Livewire Async Select

A powerful async select component for Laravel Livewire with Alpine.js - a modern alternative to Select2

Package

drpshtiwan/livewire-async-select

View on GitHub →

Livewire Async Select

A powerful async select component for Laravel Livewire with Alpine.js - a modern, lightweight alternative to Select2.

πŸŽ₯ Demo

▢️ Watch Full Demo on YouTube

✨ Features

  • πŸš€ Asynchronous Loading - Load options dynamically from API endpoints
  • πŸ” Search & Filter - Built-in search with debouncing
  • 🎯 Multiple Selection - Beautiful chip/tag display
  • ⚑ Alpine.js Powered - Lightweight, no jQuery dependency
  • 🎨 Styled with Tailwind CSS - Pre-built styles with las- prefix
  • 🎭 Custom Slots - Fully customizable rendering
  • πŸ“¦ Easy Integration - Native Livewire component
  • πŸ”„ Two-way Binding - Full wire:model support
  • πŸ”’ No Style Conflicts - All classes prefixed with las-

πŸ“š Documentation

πŸ“– Full Documentation

Complete guides, examples, and API reference available at:

https://livewire-select.thejano.com/

To build and view the documentation locally, see DOCS.md.

⚑ Quick Install

  1. Install via Composer:
composer require drpshtiwan/livewire-async-select
  1. Publish the CSS assets:
php artisan vendor:publish --tag=async-select-assets
  1. Setup your layout (important!):
<head>
    @asyncSelectStyles
    @livewireStyles
</head>
<body>
    {{ $slot }}
    
    @livewireScripts
    @stack('scripts')  {{-- Required! --}}
</body>

⚠️ Important: The @stack('scripts') directive is required for the component to work properly.

🎯 Basic Usage

<livewire:async-select
    name="user_id"
    wire:model="selectedUser"
    endpoint="/api/users/search"
    placeholder="Search users..."
/>

β†’ View full documentation

πŸ“‹ Requirements

  • PHP 8.1+
  • Laravel 10.x, 11.x, or 12.x
  • Livewire 3.3+

πŸ†š Why This Package?

Feature Livewire Async Select Select2
jQuery Dependency ❌ No βœ… Yes
Livewire Integration βœ… Native ⚠️ Manual
Bundle Size 🟒 Small 🟑 Large
Modern Stack βœ… Yes ❌ Legacy

🀝 Contributing

Contributions are welcome! Please see the documentation for details.

πŸ“„ License

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

πŸ™ Credits

πŸ”— Links

Drpshtiwan Livewire Async Select Related Articles

Big New Livewire Release: v2.6.0 image

Big New Livewire Release: v2.6.0

Read article
Laravel Livewire Async Select image

Laravel Livewire Async Select

Read article
Upcoming Livewire v3 Features and Changes image

Upcoming Livewire v3 Features and Changes

Read article
Livewire v3 Has Been Released image

Livewire v3 Has Been Released

Read article
Laravel Livewire: 14 Tips & Tricks image

Laravel Livewire: 14 Tips & Tricks

Read article
Building a Multi-Step Form With Laravel, Livewire, and MongoDB image

Building a Multi-Step Form With Laravel, Livewire, and MongoDB

Read article

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

Pushsilver

Pushsilver is simple invoicing for freelancers and small studios β€” send polished invoices, automate reminders, and get paid on time without the bloat.

Pushsilver

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift