Giter Site home page Giter Site logo

ibnujakaria / multiple-select-js Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 2.0 2.39 MB

A simple javascript library for multiple select component that supports Bootstrap 4 natively.

Home Page: https://ibnujakaria.github.io/multiple-select-js

License: MIT License

JavaScript 87.25% HTML 9.59% CSS 3.16%
multiple-select bootstrap4 dropdown multiselectdropdown javascript-library multiselect-library

multiple-select-js's Introduction

Multiple Select

A simple javascript (non jQuery) library for multiple select component that supports Bootstrap 4 natively.

Installation

You can install multiple-select-js in 3 options:

Using NPM

npm i multiple-select-js

And then, simply import it using es6 syntax.

import MultipleSelect from 'multiple-select-js'

Using CDN

<!-- Bootstrap 4 -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<!-- Multiple Select JS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/multiple-select-js/dist/css/multiple-select.css">
<script src="https://cdn.jsdelivr.net/npm/multiple-select-js/dist/js/multiple-select.js"></script>

Manually Download

<link href="/dist/css/multiple-select.css" rel="stylesheet">
<script src="/dist/js/multiple-select.js"></script>

Basic Usage

For single select.

<div class="form-group">
  <label for="select-language">Single Select</label>
  <select id="select-language">
    <option value="php">PHP</option>
    <option value="javascript">Javascript</option>
    <option value="python">Python</option>
    <option value="java">Java</option>
  </select>
</div>
new MultipleSelect('#select-language', {
  placeholder: 'Select Language'
})

For Multiple select you can simply add multiple attribute to the select tag.

<div class="form-group">
  <label for="select-language">Multiple Select</label>
  <select id="select-multiple-language" multiple>
    <option value="php">PHP</option>
    <option value="javascript">Javascript</option>
    <option value="python">Python</option>
    <option value="java">Java</option>
  </select>
</div>
new MultipleSelect('#select-multiple-language', {
  placeholder: 'Select Language'
})

Documentation

Go to this link for the complete documentation.

License

The Multiple Select Js library is open-source software licensed under the MIT license.

multiple-select-js's People

Contributors

dependabot[bot] avatar ibnujakaria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

multiple-select-js's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.