Bootstrap 5 compatible bootstrap-tagsinput-rails. Uses bootstrap-tagsinput 0.8.
Tested on Bootstrap 5.0.1
Add this line to your application's Gemfile:
gem 'bootstrap5-tagsinput-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install bootstrap5-tagsinput-rails
in app/assets/application.js
//= require bootstrap-tagsinput
in app/assets/application.css
*= require bootstrap-tagsinput
in form view, you should add data-role='tagsinput'
within input tag as the follows: for example, in simple-form
view template,
<%= f.input :tag_list, input_html:{data:{role:'tagsinput'}} %>
Or if using Rails 4 with Bootstrap, use the following,
<%= f.text_field :tag_list, 'data-role'=>'tagsinput' %>
That's it
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
bootstrap-tagsinput - Original source
bootstrap-tagsinput-rails - Original gemified Rails source
Tim Ville's bootstrap-tagsinput-rails fork - Bootstrap 4 compatible version