Home Examples Plugins Docs
GitHub NPM


ESM Modules

In this example, Tom Select is loaded from ECMAScript modules. Note: modules are not supported by Internet Explorer and other older browsers. 1 2

<script type="module">
import TomSelect from '/esm/tom-select.js';
import '/esm/plugins/remove_button/plugin.js';

new TomSelect("#select-tags",{
plugins: ['remove_button'],
create: true,
});
</script>

<select id="select-tags" multiple placeholder="Best movies and TV shows">
<option selected>Magnum P.I.</option>
<option>Blue Bloods</option>
<option>Quigley Down Under</option>
<option>Three Men and a Baby</option>
<option>Mr. Baseball</option>
</select>