Scrollable


Use scrollable option via JavaScript or data-scrollable-on via attribute to let the created component be scrollable. You also need to set a legit data-scrollable-height via attribute if you want to use this feature.

<div class="container">
    <select id="scrollable-select" multiple="multiple">
        <option value="Banana">Banana</option>
        <option value="Apple">Apple</option>
        <option value="Orange">Orange</option>
        <option value="Lemon" selected="selected">Lemon</option>
        <option value="Pepper">Pepper</option>
        <option value="Mushrooms">Mushrooms</option>
        <option value="Cabbages" selected="selected">Cabbages</option>
        <option value="Celery">Celery</option>
        <option value="Garlic" selected="selected">Garlic</option>
        <option value="Brocoli" selected="selected">Brocoli</option>
    </select>
</div>

let select = new betterNiceSelect.BetterNiceSelect("#scrollable-select", {
    scrollable: {
        on: 'true',
        height: '200px'
    }
});