Select picker

Basic

data-provide="selectpicker" applies to a <select>


With optgroups



Multiple

Add multiple attribute


Live search

Add data-live-search="true"


Limit selection

Add multiple data-max-options="2"



Or for optgroup add data-max-options="2"


Placeholder

Add title attribute



Multiple example


Selected text

Add title attribute to <option>


Subtext

Add data-subtext="..." to <option>


Checkmark

Add class .show-tick


Style individual options

Use classes and styles in <option>


Width using bootstrap grid

Using data-width

Add data-width="auto"

Add data-width="fit"

Add data-width="200px"

Add data-width="75%"


Options icon

Add data-icon="fa fa-user" to <option>


Custom content

Add data-content="..." to <option>


Select/deselect all options

Add data-actions-box="true"


Divider

Include <option data-divider="true"></option> in options


Menu header

Add data-header="..."


Disabled

Add disabled attribute


Language

Add data-lang="en_US" or any of available language codes.

Please notice that you can't set a specific language for each select-picker. For example, once you add a data-lang="zh_CN" to any of select pickers, all of the select pickers in the page uses Chinese language.

Types

Select pickers support all kind of input types.