PHPackages                             mrshanebarron/tags-input - 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. mrshanebarron/tags-input

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

mrshanebarron/tags-input
========================

Tags input component for Laravel - supports Livewire and Vue

v1.0.3(6mo ago)09MITPHPPHP ^8.1

Since Dec 14Pushed 6mo agoCompare

[ Source](https://github.com/mrshanebarron/tags-input)[ Packagist](https://packagist.org/packages/mrshanebarron/tags-input)[ RSS](/packages/mrshanebarron-tags-input/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Tags Input
==========

[](#tags-input)

Tag input component with suggestions and validation for Laravel applications. Supports max tags limit, duplicate prevention, and autocomplete suggestions. Works with Livewire and Vue 3.

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

[](#installation)

```
composer require mrshanebarron/tags-input
```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```

```

### With Placeholder

[](#with-placeholder)

```

```

### With Max Tags Limit

[](#with-max-tags-limit)

```

```

### With Suggestions

[](#with-suggestions)

```

```

### Allow Duplicates

[](#allow-duplicates)

```

```

### Custom Separator

[](#custom-separator)

```

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`tags`array`[]`Initial tags array`placeholder`string`'Add a tag...'`Input placeholder text`maxTags`int`0`Maximum number of tags (0 = unlimited)`suggestions`array`[]`Autocomplete suggestions`allowDuplicates`boolean`false`Allow duplicate tags`separator`string`','`Character to separate tags on input### Events

[](#events)

```

```

The `tags-updated` event includes the current tags array.

Vue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbTagsInput } from './vendor/sb-tags-input';
app.component('SbTagsInput', SbTagsInput);
```

### Basic Usage

[](#basic-usage-1)

```

import { ref } from 'vue';
const tags = ref(['Vue', 'React', 'Angular']);

```

### With Options

[](#with-options)

```

```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`modelValue`Array`[]`v-model binding for tags`placeholder`String`'Add a tag...'`Placeholder text`maxTags`Number`0`Max tags (0 = unlimited)`suggestions`Array`[]`Autocomplete options`allowDuplicates`Boolean`false`Allow duplicates`separator`String`','`Input separator### Events

[](#events-1)

EventPayloadDescription`update:modelValue`arrayEmitted when tags change`updated`arrayEmitted with current tags`tag-added`stringEmitted when a tag is added`tag-removed`stringEmitted when a tag is removedHandling Tags in Backend
------------------------

[](#handling-tags-in-backend)

```
// In your Livewire component
public array $tags = [];

#[On('tags-updated')]
public function handleTagsUpdate(array $tags): void
{
    $this->tags = $tags;
}

public function save(): void
{
    // Save as JSON
    $model->tags = json_encode($this->tags);

    // Or use Laravel's array cast
    $model->tags = $this->tags;
}
```

Keyboard Support
----------------

[](#keyboard-support)

- **Enter**: Add current input as tag
- **Comma** (or custom separator): Add tag
- **Backspace**: Remove last tag when input is empty
- **Arrow keys**: Navigate suggestions

Styling
-------

[](#styling)

The tags input includes:

- Pill-style tags with remove button
- Hover effects on tags
- Dropdown suggestions list
- Focus ring on input

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

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x
- Alpine.js

License
-------

[](#license)

MIT License

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance67

Regular maintenance activity

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

4

Last Release

200d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/193358540?v=4)[Mr Shane Barron](/maintainers/mrshanebarron)[@mrshanebarron](https://github.com/mrshanebarron)

### Embed Badge

![Health badge](/badges/mrshanebarron-tags-input/health.svg)

```
[![Health](https://phpackages.com/badges/mrshanebarron-tags-input/health.svg)](https://phpackages.com/packages/mrshanebarron-tags-input)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

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

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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