Select2
Basic

Select2 can take a regular select box and turn it into this...


Multiple Selection

Select2 also supports multi-value select boxes. The select below is declared with the multipleattribute.


Limiting the number of selections

Select2 multi-value select boxes can set restrictions regarding the maximum number of options selected. The select below is declared with the multipleattribute with maxSelectionLengthin the select2 options.


Automatic tokenization

Select2 supports ability to add choices automatically as the user is typing into the search field. Try typing in the search field below and entering a space or a comma.



The separators that should be used when tokenizing can be specified using the tokenSeparatorsoptions.

Loading array data

Select2 provides a way to load the data from a local array.