multiple-select-vanilla
Version:
This lib allows you to select multiple elements with checkboxes
55 lines (38 loc) • 1.22 kB
Markdown
//ghiscoding.github.io/multiple-select-vanilla/) to see all available options/methods (there's a lot).
```sh
npm install multiple-select-vanilla
```
```html
<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
```ts
import { multipleSelect } from 'multiple-select-vanilla';
const ms = multipleSelect('.multiple-select');
```
```ts
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 },
]
});
```
[ ](https://github.com/ghiscoding/multiple-select-vanilla/blob/main/packages/multiple-select-vanilla/CHANGELOG.md)
[ ](https://github.com/ghiscoding/multiple-select-vanilla/blob/main/LICENSE)
Available [**Live demo**](https: