GithubHelp home page GithubHelp logo

minimalist-components / mn-select Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 3 MB

A select component to desktop and mobile devices

License: MIT License

JavaScript 67.64% CSS 14.08% HTML 17.82% Shell 0.46%
webcomponents javascript pure-javascript agnostic-to-frameworks mn-selects

mn-select's Introduction

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

mn-select's People

Contributors

darlanmendonca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jsdelivrbot

mn-select's Issues

fix errors to angular

the render of angular, occurs after html render, so, the set value of this components is called twice, and an error occur

screen shot 2017-04-24 at 11 49 57

because, assign value, validate if has an option with value correspondent (options has values={{ databind here }})

so, I need found a way to fix this warn

adjust events to keypress esc

some conflicts existings right now, e.g.

has a dialog opened
inside a dialog, has a select
when I open select, and press esc, the select opened need to be closed
the dialog closes too, what is a bad thing

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.