multiple-select-vanilla

ghiscoding
esm Styles
multiple-select-vanilla JS library on GitHub multiple-select-vanilla JS library on npm Download multiple-select-vanilla JS library

This lib allows you to select multiple elements with checkboxes

Version 4.3.2 License MIT
multiple-select-vanilla has no homepage
multiple-select-vanilla JS library on GitHub
multiple-select-vanilla JS library on npm
Download multiple-select-vanilla JS library
Keywords
checkboxesmultiple-selectsingle-selectselect

Multiple-Select-Vanilla

Live Demo

Available Live demo to see all available options/methods (there's a lot).

Installation

npm install multiple-select-vanilla

Basic Usage

1. from a native <select>

<select class="multiple-select full-width" data-test="select1">
  <option value="1">First</option>
  <option value="2">Second</option>
  <option value="3">Third</option>
  <option value="4">Fourth</option>
</select>

and then initialize ms-select

import { multipleSelect } from 'multiple-select-vanilla';

const ms = multipleSelect('.multiple-select');
2. or from a data array or object
import { multipleSelect } from 'multiple-select-vanilla';

const ms = multipleSelect('.multiple-select', {
  data: [
    { text: 'First', value: 1 },
    { text: 'Second', value: 2 },
    { text: 'Third', value: 3 },
    { text: 'Fourth', value: 4 },
  ]
});

Changelog

CHANGELOG

LICENSE

MIT License