A great vanilla JS customizable select box/text input plugin, to build awesome forms UI.
Choices.js – make your input select boxes beautiful
A vanilla, lightweight (~20kb gzipped), configurable select box/text input plugin. Similar to Select2 and Selectize but without the jQuery dependency. Instead we have very extensive options of configurations. Additionally it gives us configurable sorting, flexible styling, fast search/filtering, clean API, right-to-left text support, and custom templates. We can turn boring select inputs into nice UI “tags” really easy. There’s no jQuery dependency, but choices.js can cooperate with jQ with no issues.
npm install choices.js
yarn add choices.js
// Pass multiple elements:
const [firstInstance, secondInstance] = new Choices(elements);
// Pass single element:
const choices = new Choices(element);
// Pass reference
const choices = new Choices('[data-trigger]');
const choices = new Choices('.js-choice');
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.