Skip to content

wide/modulus-dropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modulus Dropdown

Enhanced dropdown component in place of <select>, to be used with @wide/modulus.

Install

npm install @wide/modulus-dropdown --save

Usage

Register this component using Modulus:

import modulus from '@wide/modulus'
import Dropdown from '@wide/modulus-dropdown'

modulus.component('dropdown', Dropdown)

Import base scss styles:

@import '@wide/modulus-dropdown';

Add [is="dropdown"] attribute to any <select> you want to enhance:

<select is="dropdown">
  <option value="plop">plop</option>
  <option value="foo">foo</option>
  <optgroup label="label">
    <option value="1">1</option>
    <option value="2">2</option>
  </optgroup>
  <option value="bar">bar</option>
</select>

Libraries

This package uses :

Authors

License

This project is licensed under the MIT License - see the licence file for details