All Projects → vorotina → Vanilla Select

vorotina / Vanilla Select

Licence: mit
Standalone replacement for select boxes.

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects

Projects that are alternatives of or similar to Vanilla Select

React Select Search
⚡️ Lightweight select component for React
Stars: ✭ 379 (+3058.33%)
Mutual labels:  search, select, dropdown
Slim Select
Slim advanced select dropdown
Stars: ✭ 517 (+4208.33%)
Mutual labels:  search, select, dropdown
Autocomplete
🔮 Fast and full-featured autocomplete library
Stars: ✭ 1,268 (+10466.67%)
Mutual labels:  search, select, dropdown
Material Ui Superselectfield
multiselection autocomplete dropdown component for Material-UI
Stars: ✭ 260 (+2066.67%)
Mutual labels:  select, dropdown
hierarchy-select
Hierarchy Select jQuery Plugin for Twitter Bootstrap
Stars: ✭ 40 (+233.33%)
Mutual labels:  select, dropdown
vue-single-select
single select dropdown with autocomplete
Stars: ✭ 43 (+258.33%)
Mutual labels:  select, dropdown
Autocomplete.js
Simple autocomplete pure vanilla Javascript library.
Stars: ✭ 3,428 (+28466.67%)
Mutual labels:  search, dropdown
Easydropdown
A lightweight library for building beautiful styleable <select> elements
Stars: ✭ 337 (+2708.33%)
Mutual labels:  select, dropdown
React Dropdown Tree Select
Lightweight, accessible, customizable and fast Dropdown Tree Select component for React
Stars: ✭ 345 (+2775%)
Mutual labels:  select, dropdown
Ngx Mat Select Search
Angular component providing an input field for searching / filtering MatSelect options of the Angular Material library.
Stars: ✭ 416 (+3366.67%)
Mutual labels:  search, select
Ionic Selectable
An Ionic-based versatile and highly customizable component that serves as a replacement to Ionic Select, and allows to search items, create items, customize the layout with templates and much more.
Stars: ✭ 459 (+3725%)
Mutual labels:  search, select
frontal
An Angular select/dropdown component
Stars: ✭ 20 (+66.67%)
Mutual labels:  select, dropdown
react-functional-select
Micro-sized & micro-optimized select component for React.js
Stars: ✭ 165 (+1275%)
Mutual labels:  select, dropdown
mithril-select
Custom Select Component for Mithril.js
Stars: ✭ 14 (+16.67%)
Mutual labels:  select, dropdown
react-native-select-pro
React Native dropdown (select) component developed by Mobile Reality
Stars: ✭ 79 (+558.33%)
Mutual labels:  select, dropdown
react-native-select-dropdown
react-native-select-dropdown is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.
Stars: ✭ 156 (+1200%)
Mutual labels:  select, dropdown
Angular Chosen
AngularJS Chosen directive is an AngularJS Directive that brings the Chosen jQuery in a AngularJS way
Stars: ✭ 695 (+5691.67%)
Mutual labels:  select, dropdown
insect
🛠 Highly customisable, minimalistic input x select field for React.
Stars: ✭ 33 (+175%)
Mutual labels:  select, dropdown
react-multi-select-component
Lightweight (~5KB gzipped) multiple selection dropdown component
Stars: ✭ 279 (+2225%)
Mutual labels:  select, dropdown
Iosdropdown
Drop Down Menu for iOS With Search And Other Awesome Customisation
Stars: ✭ 390 (+3150%)
Mutual labels:  search, dropdown

vanilla-select npm version

A vanilla, lightweight (~2.5kb gzipped), configurable select box component.

Demo Page

Advantages

  • Lightweight
  • No Dependencies
  • Elegant API - inspiration taken from React.Component
  • Fast search

Installation

With NPM:

npm install vanilla-select --save-dev

With Bower:

bower install vanilla-select --save-dev

Or include directly:

<!-- Include CSS -->
<link rel="stylesheet" href="dist/vanilla-select.min.css">
<!-- Include JavaScript -->
<script src="/dist/vanilla-select.min.js"></script>

Setup

  const source = [{
        icon: 'fa-font',
        value: 'Amatic SC'
    }];
  		
  const select = new Select({
            placeholder: 'Select Font',
            dataset: source,
            search: true,
            noResults: 'No results found',
            onSelected: item => callback(item)
        }).componentMount({
            el: document.querySelector('[ref="select"]')
        });

Configuration

Option Definition
placeholder Type: String
Default: ''
Placeholder text
dataset Type: Array
Default: []
Equivelant to the element within a select
search Type: Boolean
Default: false
Whether a user should be allowed to search
noResults Type: String
Default: ''
The text that is shown when search has returned no results
selected Type: Object
Default: null
Default selected option
onSelected Arguments: item Callback, invoked each time the item is selected, regardless if it changes the value

Development

To setup a local environment: clone this repo, navigate into it's directory in a terminal window and run the following command:

npm install

Browser compatibility

vanilla-select is compiled using Closure Compiler to enable support for ES5 browsers.

Browsers

Edge 15+ Chrome 41+ FireFox 35+ Opera 28+ Safari 9+

If you need to support IE11 and IE Edge14 - use vanilla-select-ie.min.js bundle. It includes element-closest polyfill.

Gulp tasks

Task Usage
gulp build Build JS an CSS
gulp serve Fire up local server for development

Roadmap

  • Keyboard navigation

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].