Choices
OverviewOfficial Website
Choices.js is a vanilla JavaScript plugin that converts the normal select or input into customizable select inputs with multi-select and autocomplete support.
Javascript
<!-- choices.js -->
<script type='text/javascript' src="{% static 'libs/choices.js/public/assets/scripts/choices.min.js' %}"></script>
Note
Choices js file is loaded in <script src="{% static 'js/plugins.js'%}"></script>.
Initjs (Custom js)
<!-- app js -->
<script src="{% static 'js/app.js'%}"></script>
Add Package
yarn add choices.js --save
Remove Package
yarn remove choices.js or you can remove package by removing specific package from package.json
Examples
Title | HTML |
---|---|
Default Choice |
|
Option Groups |
|
Options added with no search |
|
Options added with no sorting |
|
Default Multiple Select |
|
Multiple Select with remove button |
|
Multiple Select with options group. |
|
Choices select limit with text input & removebutton |
|
Choices unique value only, no pasting |
|
Choices with disable option |
|