PHPackages                             rishadblack/wire-tomselect - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rishadblack/wire-tomselect

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rishadblack/wire-tomselect
==========================

Tom Select

1.1.8(9mo ago)47922MITPHPPHP ^8.1

Since Dec 12Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/rishadblack/wire-tomselect)[ Packagist](https://packagist.org/packages/rishadblack/wire-tomselect)[ Docs](https://github.com/rishadblack/wire-tomselect)[ RSS](/packages/rishadblack-wire-tomselect/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (4)Dependencies (2)Versions (19)Used By (0)

WireTomSelect - Laravel Livewire Searchable Dropdown
====================================================

[](#wiretomselect---laravel-livewire-searchable-dropdown)

**WireTomSelect** is a reusable, customizable Livewire component designed for implementing searchable dropdowns with minimal effort in Laravel projects. It provides a clean interface to query data, map results, and handle user selections.

Features
--------

[](#features)

- Easy integration with Laravel Livewire.
- Configurable search, label, and value fields.
- Supports single and multiple selections.
- Customizable query logic.
- Placeholder, disabled state, and max options settings.

---

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

[](#installation)

### Step 1: Install the Package

[](#step-1-install-the-package)

You can install the package via Composer:

```
composer require rishadblack/wire-tomselect
```

### Step 2: Publish the Views

[](#step-2-publish-the-views)

If you need to customize the default views, you can publish them:

```
php artisan vendor:publish --tag=wire-tomselect-views
```

This will publish the `wire-tomselect::search` view to your `resources/views/vendor` directory.

---

Usage
-----

[](#usage)

### Step 1: Extend the `SearchComponent`

[](#step-1-extend-the-searchcomponent)

To create your searchable dropdown component, extend the abstract `SearchComponent` class and define the required `builder` and `configure` methods.

```
namespace App\Http\Livewire;

use Rishadblack\WireTomselect\SearchComponent;
use App\Models\User;

class UserSearch extends SearchComponent
{
    public function builder(): Builder
    {
        return User::query(); // Base query for fetching data
    }

    public function configure(): void
    {
        $this->isSearchable();
        $this->setSearchField(['name', 'email']); // Fields to search in
    }
}
```

### Step 2: Use the Component in a Blade File

[](#step-2-use-the-component-in-a-blade-file)

Include your component in a Blade file as follows:

```

```

---

Customization
-------------

[](#customization)

### Configure Fields

[](#configure-fields)

- **Value Field**: Field used for the dropdown value (default: `id`).
- **Label Field**: Field used for the dropdown label (default: `name`).

Set these fields in your `configure` method:

```
$this->setValueField('id');
$this->setLabelField('name');
```

### Search Fields

[](#search-fields)

Specify the fields for performing searches using:

```
$this->setSearchField(['name', 'email']);
```

### Maximum Options

[](#maximum-options)

Set the maximum number of options to display using:

```
$this->setMaxOptions(10);
```

---

Example
-------

[](#example)

Here’s a complete example for creating a searchable product dropdown:

```
namespace App\Http\Livewire;

use Rishadblack\WireTomselect\SearchComponent;
use App\Models\Product;

class ProductSearch extends SearchComponent
{
    public function builder(): Builder
    {
        return Product::query();
    }

    public function configure(): void
    {
        $this->isSearchable();
        $this->setSearchField(['name', 'sku']);
        $this->setMaxOptions(15);
    }
}
```

In your Blade template:

```

```

---

Contributing
------------

[](#contributing)

Contributions are welcome! Please follow these steps:

1. Fork the repository.
2. Create a feature branch.
3. Submit a pull request with a detailed description of your changes.

---

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

---

Feel free to adapt this documentation based on your repository's specific needs!

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance58

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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 ~16 days

Recently: every ~52 days

Total

18

Last Release

272d ago

Major Versions

0.0.1 → 1.0.02024-12-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/50762398?v=4)[S M Rishad](/maintainers/rishadblack)[@rishadblack](https://github.com/rishadblack)

---

Top Contributors

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

---

Tags

laravelWireTomselect

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rishadblack-wire-tomselect/health.svg)

```
[![Health](https://phpackages.com/badges/rishadblack-wire-tomselect/health.svg)](https://phpackages.com/packages/rishadblack-wire-tomselect)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k9.6k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90128.1k](/packages/emargareten-inertia-modal)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

3614.9k](/packages/linkxtr-laravel-qrcode)[wearepixel/laravel-cart

A cart implementation for Laravel

1355.6k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

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