Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Support for a multiple selection dropdown using fully native JavaScript, CSS, and HTML

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.md
Notifications You must be signed in to change notification settings

bsara/multi-select-dropdown.js

Repository files navigation

MultiSelectDropdown.js

CPOL v1.02 License

NPM Package  Bower Package

Support for a multiple selection dropdown using fully native JavaScript, CSS, and HTML (no extra libraries needed).

Includes support for AMD, CommonJS, and global inclusion via an HTML script tag.

See Live Demo

Install

  • NPM: $ npm install --save multi-select-dropdown
  • Bower: $ bower install --save multi-select-dropdown
  • CDN - Full (minified):
    • <script src="//unpkg.com/[email protected]/dist/multi-select-dropdown.min.js"></script>
    • <script src="//unpkg.com/[email protected]/dist/styles/multi-select-dropdown.min.css"></script>
  • CDN - Full (not minified):
  • CDN - Element Only (minified):
    • <script src="//unpkg.com/[email protected]/dist/multi-select-dropdown-element.min.js"></script>
    • <script src="//unpkg.com/[email protected]/dist/styles/multi-select-dropdown.min.css"></script>
  • CDN - Element Only (not minified):
    • <script src="//unpkg.com/[email protected]/dist/multi-select-dropdown-element.js"></script>
    • <script src="//unpkg.com/[email protected]/dist/styles/multi-select-dropdown.css"></script>
  • Download

Features

  • Built with fully native, pure JavaScript! No extra libraries needed.
  • Uses native HTML5 select and option elements. (I.E. It won't mess up your existing styles and won't create a million new elements that you don't expect to be present on a page).
  • Uses overridable CSS for all needed style manipulations. (I.E. No manipulation of style attribute on HTML tags!)
  • Nearly everything is done for you! Just set the correct data attributes, and you're done!
  • "Select All Options" feature built in, no extra work needed.
  • SCSS library provided for easier style overrides.
  • Simple manager provided in case you just want to initialize for all desired elements on a page, rather than initializing support one by one.
  • Super lightweight.
  • Very easy to use.
  • Support for...
    • AMD
    • CommonJS
    • Global HTML script tag

Screenshots

Native Select Box Used

screenshot 0


Checkbox For Each Option

screenshot 1


Select Label Updates Automatically

screenshot 3


screenshot 2


Built-in Select All Option

NOTE: This feature can be turned off if not needed

screenshot 4



Documentation


Code Samples

  • TODO

Including the Library in your Project

Include as AMD Module

define([ 'multi-select-dropdown' ], function(MultiSelectDropdown) {
  MultiSelectDropdown.init();
  ...
});

Include as CommonJS Module

var MultiSelectDropdown = require('multi-select-dropdown');

MultiSelectDropdown.init();
...

Include via HTML Script Tag

<script type="text/javascript" src="multi-select-dropdown.min.js" />
<script type="text/javascript">
  MultiSelectDropdown.init();
  ...
</script>

About

Support for a multiple selection dropdown using fully native JavaScript, CSS, and HTML

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published