Skip to main content

Maximum number of items

This example only allows 3 items. Select one more item and the control will be disabled until one or more are deleted.

Html
<select multiple>
<option value=""></option>
<option value="1">Awesome</option>
<option value="2">Beast</option>
<option value="3">Compatible</option>
<option value="4">Thomas Edison</option>
<option value="5">Nikola</option>
<option value="6">Selectize</option>
<option value="7">Javascript</option>
</select>

Javascript
$('select').selectize({ maxItems: 3 })