npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

multi-select-dropdown

v0.0.2

Published

[![CPOL v1.02 License](https://img.shields.io/badge/license-CPOL--1.02-blue.svg?style=flat-square)](https://github.com/bsara/multi-select-dropdown.js/blob/master/LICENSE.md)

Downloads

138

Readme

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="//npmcdn.com/[email protected]/dist/multi-select-dropdown.min.js"></script>
    • <script src="//npmcdn.com/[email protected]/dist/styles/multi-select-dropdown.min.css"></script>
  • CDN - Full (not minified):
  • CDN - Element Only (minified):
    • <script src="//npmcdn.com/[email protected]/dist/multi-select-dropdown-element.min.js"></script>
    • <script src="//npmcdn.com/[email protected]/dist/styles/multi-select-dropdown.min.css"></script>
  • CDN - Element Only (not minified):
    • <script src="//npmcdn.com/[email protected]/dist/multi-select-dropdown-element.js"></script>
    • <script src="//npmcdn.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>