--- title: Plugin Examples nav_title: Plugins tags: demo exclude: true layout: layout_default script: --- {% from "demo.njk" import demo_small %}

Plugins are bundled in tom-select.complete.js but can also be loaded individually. To load individually, include tom-select.base.js and any combination of plugins of your choosing. The plugin documentation has more information about custom bundles and plugin development.

Items

Plugins that modify the behavior and/or display of items (selected options).

{# Remove Button #}

Remove Button

Adds one-click removal of each item.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}
{# no backspace delete #}

No Backspace Delete

Prevents the user from removing items with backspace and delete keys unless items are active. Use with no_active_items to disable deleting with keyboard events entirely.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}
{# drag-drop #}

Drag Drop

Allows users to sort items with drag-n-drop.
More info...
{% set html %} {% endset %} {{ demo_small( html, script, '', true ) }}
{# restore on backspace #}

Restore on Backspace

Fills the control input with the value of deleted items upon deletion.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}
{# clear button #}

Clear Button

Adds a small button to the right side of the control that, when clicked, removes all of the items (selected options).
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}
{# no active items #}

No Active Items

Disables selecting items.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}

Control Input

Plugins that modify the behavior and/or display of the control input.

{# Dropdown input #}

Dropdown Input

Positions the control input in the select dropdown.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}
{# Input Autogrow #}

Input Autogrow

Resizes the control input as the user types.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}

Dropdown

Plugins that modify the behavior and/or display of the dropdown content.

{# Checkbox options #}

Checkbox Options

Displays checkboxes next to each option in the dropdown.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}
{# optgroup columns #}

Optgroup Columns

Divides option groups into columns and allows users to navigate columns with left and right keys.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}
{# dropdown header #}

Dropdown Header

Adds a customizable header to the select dropdown.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}
{# virtual_scroll #}

Virtual Scroll

Loads remote data as users scroll through dropdown
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}

Other

{# Change listener #}

Change Listener

Updates the value of the Tom Select instance when the value of the underlying <input> element changes.
More info...
{% set html %} {% endset %} {{ demo_small( html, script) }}