Checkbox Options
new TomSelect('#ex-checkbox-options',{
plugins: {
'checkbox_options': {
'checkedClassNames': ['ts-checked'],
'uncheckedClassNames': ['ts-unchecked'],
}
},
});
<select id="ex-checkbox-options" autocomplete="off" multiple>
<option>amazing</option>
<option selected>awesome</option>
<option>cool</option>
<option selected>excellent</option>
<option>great</option>
<option>neat</option>
<option>superb</option>
<option>wonderful</option>
</select>
Plugin Configuration
Setting | Description |
---|---|
className |
Search CSS class for the checkbox
Type:
string
Default:
tomselect-checkbox
|
checkedClassNames |
The CSS classes the checkbox has if it was checked
Type:
string[]
Default:
|
uncheckedClassNames |
The CSS classes the checkbox has if it was not checked
Type:
string[]
Default:
|