Select2 can take a regular select box with search options within the Select control.
Single Select with Label
Disabled Mode
Hiding the search box
Select2 allows you to hide the search box depending on the number of options which are displayed. In this example,
we use the value
Infinity
to tell Select2 to never display the search box.
Select With Icon
Use data attribute
data-icon
to add icon name for each options. And use class
.select2-icons
to set icon with option.
Select2 also supports multi-value select boxes. The select below is declared with the
multiple
attribute.
Multi Select with Label
Multi Select with 75% width
Multi Select Placeholder
Disabled Mode
Multi Select with Label
The select
below is declared with the
multiple
attribute with
maximumSelectionLength
in the select2 options.
Select With Icon
Use data attribute
data-icon
to add icon name for each options. And use class
.select2-icons
to set icon with option.