PHPackages                             akhmads/select-components - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. akhmads/select-components

ActiveLibrary[Templating &amp; Views](/categories/templating)

akhmads/select-components
=========================

Laravel Blade components for remote, offline and multi selects.

v1.0.1(5d ago)01MITBladePHP ^8.2

Since Mar 16Pushed 5d agoCompare

[ Source](https://github.com/akhmads/select-components)[ Packagist](https://packagist.org/packages/akhmads/select-components)[ Docs](https://github.com/akhmads/select-components)[ RSS](/packages/akhmads-select-components/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

select-components
=================

[](#select-components)

A small Laravel package providing reusable Blade components for select inputs.

This package is **designed for Livewire** and works well together with **Mary UI** (daisyUI + Tailwind UI components).

Stack
-----

[](#stack)

This package is built using:

- Alpine.js
- Tailwind CSS
- daisyUI

Requirements
------------

[](#requirements)

- **Laravel 12+**
- **Livewire** (includes Alpine.js)
- **daisyUI** (Tailwind CSS plugin) or **Mary UI**

Features
--------

[](#features)

- Responsive design
- Dark mode support
- Adaptive dropdowns (auto width, truncation)
- Keyboard navigation support (arrow keys + enter)
- Built for Livewire (`wire:model` friendly)
- Clearable selection + optional placeholder
- Supports disabled state + focus management
- Initial value support (pre-selected values)
- Works well with Mary UI / daisyUI styling

Included components
-------------------

[](#included-components)

- **``**

    - Fetches options via AJAX (remote endpoint)
    - Supports searching/filtering as you type
    - Keeps label/value in sync when `wire:model` changes
- **``**

    - Uses a local `options` array (static data)
    - Supports searching locally
- **``**

    - Supports selecting multiple values
    - Uses the same remote (AJAX) mechanism as `remote-select`

Installation
------------

[](#installation)

### Install livewire

[](#install-livewire)

- Install: `composer require livewire/livewire`
- Docs:

### Install **daisyUI** (Tailwind CSS plugin) or **Mary UI**

[](#install-daisyui-tailwind-css-plugin-or-mary-ui)

- Docs:
- Docs:

### Install via Composer (Packagist)

[](#install-via-composer-packagist)

```
composer require akhmads/select-components
```

Usage
-----

[](#usage)

### Remote select

[](#remote-select)

```

```

- `remote`: URL endpoint that returns a JSON array of option objects (e.g. `/api/users` or `{{ route('api.user') }}`).
- `option_value`: the key to use for the option value (default: `id`).
- `option_label`: the key to use for the option label (default: `name`).
- `placeholder`: placeholder text shown when nothing is selected.
- `clearable`: when present, allows clearing the selection.
- `initial_value`: (optional) can be either:
    - an array of IDs (will fetch labels from remote)
    - an array of objects `{id, name}` (will be used directly)

Add a simple endpoint to `routes/web.php` (or `routes/api.php`) that returns users in JSON:

```
use Illuminate\Http\Request;

Route::get('/api/users', function (Request $request) {
     $search = $request->query('search');

     $users = \App\Models\User::query()
         ->when($search, function ($q) use ($search) {
             $q->where('name', 'like', "%{$search}%")
                 ->orWhere('email', 'like', "%{$search}%");
         })
         ->orderBy('name')
         ->limit(20)
         ->get();

     return $users;
})->name('api.users');
```

### Offline select

[](#offline-select)

```

```

### Multi select

[](#multi-select)

```

```

Overriding views (optional)
---------------------------

[](#overriding-views-optional)

To customize the component Blade templates, publish the views:

```
php artisan vendor:publish --tag=views --provider="SelectComponents\SelectComponentsServiceProvider"
```

Notes
-----

[](#notes)

- The components are registered automatically via package discovery.
- `remote-select` and `multi-select` rely on a JSON endpoint returning an array of objects. Each object should have an `id` (or your chosen key) and a label key.

### Contributing

[](#contributing)

To work on this package locally, clone the repo into a `packages` folder inside your Laravel project.

From your Laravel project root:

```
mkdir -p packages
cd packages
git clone https://github.com/akhmads/select-components.git
```

Then configure Composer to load it as a local package by adding a path repository to your `composer.json` (this is already configured in this workspace):

```
"repositories": [
  {
    "type": "path",
    "url": "packages/select-components",
    "options": {
      "symlink": true
    }
  }
]
```

Finally, require the local package in your app:

```
composer require akhmads/select-components:*@dev --prefer-source
```

Once installed, you can make changes in `packages/select-components` and test them directly in your Laravel app.

---

License
-------

[](#license)

This package is released under the MIT License. See the official license text at .

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance99

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

5d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd6c1702c8827dc55cee21b11c4926c2c1399aa38fc76b783dc3d1ba9ff08c16?d=identicon)[akhmadshaleh](/maintainers/akhmadshaleh)

---

Top Contributors

[![akhmads](https://avatars.githubusercontent.com/u/13780840?v=4)](https://github.com/akhmads "akhmads (4 commits)")

---

Tags

laravelcomponentslivewireselecttailwindcssalpinejsDaisyUImaryui

### Embed Badge

![Health badge](/badges/akhmads-select-components/health.svg)

```
[![Health](https://phpackages.com/badges/akhmads-select-components/health.svg)](https://phpackages.com/packages/akhmads-select-components)
```

###  Alternatives

[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.4k421.8k13](/packages/robsontenorio-mary)[victorybiz/laravel-simple-select

Laravel Simple Select inputs component for Blade and Livewire.

13720.8k](/packages/victorybiz-laravel-simple-select)[developermithu/tallcraftui

TallCraftUI is a Laravel blade UI components library built on TALL stack

1662.2k](/packages/developermithu-tallcraftui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
