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. rishadblack/wire-tomselect

ActiveLibrary

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

Tom Select

1.1.8(7mo ago)47092MITPHPPHP ^8.1

Since Dec 12Pushed 7mo 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 1mo 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

41

—

FairBetter than 89% of packages

Maintenance63

Regular maintenance activity

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

227d ago

Major Versions

0.0.1 → 1.0.02024-12-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/6774a853b82e3460374fa933fecb393e8f59a915ff24548c71cf9ebf770e64e1?d=identicon)[rishadblack](/maintainers/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

[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[glhd/linen

21135.6k](/packages/glhd-linen)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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