Simple Dual List Box With A Search For Bootstrap 4 | duallistbox

Duallistbox is a simple, clean and filterable (multi-select) dual list box built with JavaScript and the latest Bootstrap 4 framework.

dual list box material design, dual list box with search, bootstrap listbox add remove, dual list box bootstrap 4, bootstrap dual listbox dynamically, dual list box jquery

How to make use of it:

1. To use this plugin, the latest Bootstrap 4 stylesheet is loaded in the document.

<!-- Required -->
<link rel="stylesheet" href="/path/to/cdn/bootstrap.min.css" />
<!-- Optional -->
<script src="/path/to/cdn/jquery.slim.min.js"></script>
<script src="/path/to/cdn/bootstrap.min.js"></script>

2. Load the JavaScript and Stylesheet plug-ins for the dual list box into the document.

<link rel="stylesheet" href="duallistbox.min.css" />
<script src="duallistbox.min.js"></script>

3. Convert a normal multiple selections to a dual list box component using the duallistbox function.

<select name="countries[]" id="test" multiple onchange="getValues()">
  <option value="Albania">Albania</option>
  <option value="Afghanistan">Afghanistan</option>
  <option value="Algeria">Algeria</option>
  <option value="Andorra">Andorra</option>
  <option value="Angola">Angola</option>
  <option value="Antigua and Barbuda">Antigua and Barbuda</option>
  <option value="Argentina">Argentina</option>
  <option value="Armenia">Armenia</option>
  <option value="Australia">Australia</option>
  <option value="Austria">Austria</option>
  <option value="Azerbaijan">Azerbaijan</option>
</select>
<script src="duallistbox.min.js"></script>

4. Get the selected options for further use.

function getValues() {
  document.getElementById('outputContainer').innerText = [...document.getElementById('test').selectedOptions].map(o => o.textContent).join(', ')
};
getValues();

Filterable Dual List Box With Move/Remove All Buttons, duallistbox Plugin/Github


See Demo And Download

Official Website(erwinheldy): Click Here

This superior jQuery/javascript plugin is developed by erwinheldy. For extra advanced usage, please go to the official website.

Related Posts

drag-drop-file-5x5-jq-uploader

Responsive Drag and Drop File Uploader/Download Plugin | 5x5_jq_uploader

5x5_jq_uploader plugin can be used to instantly create a drop file area and file queue with a little bit of preparation. Bootstrap is used for responsive planning…

Bootstrap-Dark-Mode

Stylesheet For Implementing Dark Mode with Bootstrap

Bootstrap Dark Mode provides a style sheet and two texts that allow you to implement Dark Mode on your website. Initially loaded based on user preferences, can…

responsive-navigation-menu

Multi-purpose Navigation Menu for Javascript Library | jQuery Corenav

coreNavigation is a multipurpose navigation menu for a jquery based javascript library, comes with more style, and is easy to integrate. 11 Default Menu 2 Responsive Navigation…

Simple-Multi-Select-Dropdown-Pure-Vanilla-Javascript

Simple Multi-Select Dropdown Pure Vanilla Javascript | multiSelect.js

MultiSelect.js is a simple, clean, and progressive JavaScript library designed for easy integration with any type of project or system. The design was heavily influenced by the…

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

how-to-create-popup-in-html-with-css

How To Create A Popup in HTML with CSS

How to create popup in html with css – Popup without JavaScript is an elegant pop-up panel component with an animated scale, written in CSS. Have you…