Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
N

tags input field

This package is possibly abandoned. Please proceed with care.

Installation Instructions

composer require whchi/nova-tags-input

Readme

release note

  • 0.0.2
  1. add custom styles support
  2. fix required rule validation

About

A simple wrapper of vue-tags-input for laravel nova

Installation

composer require whchi/nova-tags-input

Example

use Whchi\NovaTagsInput\Tags;
...
  Tags::make('tags')->autocompleteItems(['tag1', 'tag2'])

config publish

php artisan vendor:publish --provider="Whchi\NovaTagsInput\FieldServiceProvider"

change whatever you want in config/nova_tags_input.php

return [
    'style_variables' => [
        // index, detail field
        '--nti-tag-bgcolor' => 'var(--primary)',
        '--nti-tag-mr' => '5px',
        '--nti-tag-color' => '#fff',
        // form field
        '--ti-valid-bgcolor' => 'var(--primary)',
        '--ti-deletion-mark-bgcolor' => 'var(--danger)',
        '--ti-selected-item-bgcolor' => 'var(--primary)',
    ],
    'props' => [
        'add-from-paste' => true,
        'add-on-blur' => true,
        'add-on-key' => [13],
        'add-only-from-autocomplete' => false,
        'allow-edit-tags' => false,
        'autocomplete-always-open' => false,
        'autocomplete-filter-duplicates' => true,
        'autocomplete-min-length' => 1,
        'avoid-adding-duplicates' => true,
        'delete-on-backspace' => true,
        'disabled' => false,
        'max-tags' => null,
        'maxlength' => null,
        'placeholder' => 'Add Tag',
        'save-on-key' => [13, ':', ';'],
        'separators' => [';'],
    ],
];

notice

Better use json column for your database.

Below is an example saving in your column

[{"text": "test"}, {"text": "中文字串"}]

Screenshots

Back to Top
Added 5 years ago
Last updated 4 Years Ago
Version 0.0.5
Composer
whchi/nova-tags-input
GitHub stars 2
Packagist downloads 11,968

Favorites

2 users favorited

Rating

N/A
(out of 5)
★★★★★
★★★★
★★★
★★
0 ratings

Author

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas