pharaonic / livewire-tagify
Tagify for Livewire components: two-way wire:model binding for tags, select, and mix modes, on Livewire Assistant.
Package info
github.com/Pharaonic/livewire-tagify
Language:JavaScript
pkg:composer/pharaonic/livewire-tagify
Requires
- php: >=8.1 <8.6
- illuminate/http: ^10.16 || ^11.0 || ^12.0 || ^13.0
- illuminate/routing: ^10.16 || ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^10.16 || ^11.0 || ^12.0 || ^13.0
- illuminate/view: ^10.16 || ^11.0 || ^12.0 || ^13.0
- livewire/livewire: ^4.3.4
- pharaonic/livewire-assistant: ^4.0
Requires (Dev)
- laravel/pint: ^1.20
- orchestra/testbench: ^8.0 || ^9.0 || ^10.0 || ^11.0
- pestphp/pest: ^1.23 || ^3.8 || ^4.0
- phpstan/phpstan: ^2.1.33
- phpunit/phpunit: ^9.6.33 || ^11.5.50 || ^12.5.8
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Tagify for Livewire components.
Two-way wire:model binding for tags, select, and mix modes, built on Livewire Assistant.
Installation
composer require pharaonic/livewire-tagify
Load Tagify as usual, then add the scripts once in your layout, before or after @livewireScripts:
@livewireScripts @livewireTagifyScripts
No Node build is needed. The 4.x line supports Livewire 4.3.4+ on Laravel 10.16+, 11, 12, and 13 with PHP 8.1 to 8.5.
Coming from 3.x? Run composer require pharaonic/livewire-tagify:^4.0. Without .live, wire:model.blur and wire:model.change now wait for the next request, as everywhere in Livewire 4; the documentation lists what changed.
Usage
<div wire:ignore> <input data-pharaonic="tagify" wire:model="skills" data-direct data-suggest data-suggest-list='["php","laravel","livewire"]'> </div>
The field follows skills both ways: adding or removing a tag updates the component (with the next request, or right away with wire:model.live), and setting the property on the server updates the tags. With data-direct the property holds plain values (["php","laravel"]); without it, Tagify's tag objects. Shorthands such as data-suggest-list, data-max, and data-delimiters cover common settings; data-options takes any other Tagify setting as JSON, including the select and mix modes.
Documentation
Read the full Livewire Tagify documentation for value shapes, modes, options, bundlers such as Vite, and upgrading from 3.x.
Support & Security
See SUPPORT.md and SECURITY.md.
License
MIT. See LICENSE.
