Bootstrap plugin to create select element with dropdown
Install with npm:
npm install @erwinstone/bs-select
Install from cdn:
Place css
between <head></head>
tags:
<head>
...
<link href="https://unpkg.com/@erwinstone/bs-select@1.0.2/dist/bs-select.min.css" rel="stylesheet">
</head>
Place js
before </body>
tag:
<body>
...
<script src="https://unpkg.com/@erwinstone/bs-select@1.0.2/dist/bs-select.min.js"></script>
</body>
* You can also use bs-select as javascript module:
<script src="yourscript.js" type="module"></script>
In yourscript.js
file, import Bss (Change location according to your path):
import Bss from './path/to/bs-select.module.js'
Or you can use it directly in the html script as a module:
<script type="module">
import Bss from './path/to/bs-select.module.js'
</script>
Name | Type | Default | Description |
---|---|---|---|
search |
boolean | false |
Show search input |
create |
boolean | false |
Allow to create a new one if no results found |
clear |
boolean | false |
Show clear button |
maxHeight |
string | 25rem |
Maximum height to show scrollbar |
Name | Params | Returns | Example |
---|---|---|---|
setValue |
string |
void |
|
removeValue |
string |
void |
|
getValue |
null |
string | array |
|