Skip to content
A Polymer selectbox with native UI on mobile
HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
test
.gitignore
LICENSE.txt
README.md
bower.json
index.html
mentallyfriendly-selectbox.html
mentallyfriendly-selectbox.png

README.md

<mentallyfriendly-selectbox>

Example of mentallyfriendly-selectbox on different devices

A Polymer selectbox with native UI on mobile

This Polymer web component works like a paper-dropdown-menu on desktop browsers but switches to the native OS select element UI on mobile devices.

Navigating a paper-dropdown-menu with a large number of options can be difficult on small-screen devices, by taking advantage of the native UI we can improve usability for the end-user.

Usage

Install via Bower:

bower i MentallyFriendly/mentallyfriendly-selectbox -S

Import mentallyfriendly-selectbox:

<link rel="import" href="mentallyfriendly-selectbox/mentallyfriendly-selectbox.html">

Start using it!

<mentallyfriendly-selectbox
  label="You can all be my..."
  values='["Friends","Draugas","Amigos","朋友","Vän","Freund","ともだち","Ami"]'
></mentallyfriendly-selectbox>

Options

Attribute Type Default Description
label String None Label for the selectbox
values Array None All values/options that can be selected
selected Array [] All values/options that are selected
multi Boolean false Can multiple values/options be selected

Contributing

Mentally Friendly loves contributions from the community!

Filing Bugs

If you find an issue, please do file it on the repository.

We love examples for addressing issues - issues with a Plunkr, jsFiddle, or jsBin will be much easier for us to work on quickly. You can start with this jsbin which sets up the basics to demonstrate a Polymer element.

Contributing Pull Requests

PR's are even better than issues. We gladly accept community pull requests. In general there are a few necessary steps before we can accept a pull request:

  • Open an issue describing the problem that you are looking to solve in your PR (if one is not already open), and your approach to solving it. This makes it easier to have a conversation around the best general approach for solving your problem, outside of the code itself.
  • Fork the repo you're making the fix on to your own Github account.
  • Code!
  • Include tests that test the range of behavior that changes with your PR. If you PR fixes a bug, make sure your tests capture that bug. If your PR adds new behavior, make sure that behavior is fully tested. Every PR must include associated tests.
  • Submit your PR, making sure it references the issue you opened.
  • If your PR fixes a bug, make sure the issue includes clear steps to reproduce the bug so we can test your fix.

If you've completed all of these steps the core team will do its best to respond to the PR as soon as possible.

Communicating with the Mentally Friendly team

Beyond Github, we try to have a variety of different lines of communication available:

License

mentallyfriendly-selectbox uses a BSD license available here

You can’t perform that action at this time.