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='assets/libs/choices.js/public/assets/scripts/choices.min.js'></script> //html file
<script type='text/javascript' src='{{ URL::asset('build/libs/choices.js/public/assets/scripts/choices.min.js') }}'></script> // laravel file
Note
Choices js file is loaded in <script src="assets/js/plugins.js"></script> //html file
Choices js file is loaded in <script src="{{ URL::asset('build/js/plugins.js') }}"></script> // laravel file
Initjs (Custom js)
<!-- app js -->
<script src="assets/js/app.js"></script> //html file
<script src="{{ URL::asset('build/js/app.js') }}"></script> // laravel file
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 |
|