mn-select

0.0.15 • Public • Published

npm version Dependency Status MIT Licence

mn-select

Minimalist select component, agnostic to framworks.

See the demo

preview demo

Install

npm install --save mn-select

And bundle dependencies and main files in dist/ with your preferred tool.

Usage

just use the tag mn-select and option, e.g.

<mn-select>
  <option value="#fff">White</option>
  <option value="#000">Black</option>
</mn-select>

To begin with an value, you can use the attribute selected in tag option

<mn-select>
  <option value="#fff">White</option>
  <option value="#000" selected>Black</option>
</mn-select>

Or just use the attribute value in mn-select

<mn-select value="#fff">
  <option value="#fff">White</option>
  <option value="#000">Black</option>
</mn-select>

If you want set the value from javascript, just assign a value to property .value, e.g.

document.querySelector('mn-select').value = '#000'

The following attributes from image are supported in this mn-select

and in option

Package Sidebar

Install

npm i mn-select

Weekly Downloads

2

Version

0.0.15

License

MIT

Last publish

Collaborators

  • darlanmendonca