Basics
Single select boxes
Multiple
Select2 also supports multi-value select boxes. The select below is declared with the multiple attribute.
Placeholders
A placeholder value can be defined and will be displayed until a selection is made. Select2 uses the placeholder attribute on multiple select boxes, which requires IE 10+. You can support it in older versions with the Placeholders.js polyfill.
Loading array data
Select2 provides a way to load the data from a local array.
Pre-selected options
Optgroup
Public methods
Custom Header and Footer
Single
Range
Live values-
Slider Success
Slider Info
Slider Warning
Slider Danger
Focus on input
Range Start
Range Stop
Default placement
Placement Left
Placement Right
Placement top
Picker 2x
Hex format
Component
Bootstrap colors
Default
With margin