https://github.com/polymerelements/paper-dropdown-menu
A Material Design browser select element
https://github.com/polymerelements/paper-dropdown-menu
Last synced: 10 months ago
JSON representation
A Material Design browser select element
- Host: GitHub
- URL: https://github.com/polymerelements/paper-dropdown-menu
- Owner: PolymerElements
- Created: 2015-07-22T17:38:41.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-10-16T14:04:35.000Z (over 2 years ago)
- Last Synced: 2024-12-11T07:38:46.476Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.webcomponents.org/element/PolymerElements/paper-dropdown-menu
- Size: 839 KB
- Stars: 61
- Watchers: 24
- Forks: 107
- Open Issues: 109
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/@polymer/paper-dropdown-menu)
[](https://travis-ci.org/PolymerElements/paper-dropdown-menu)
[](https://webcomponents.org/element/@polymer/paper-dropdown-menu)
## <paper-dropdown-menu>
`paper-dropdown-menu` is similar to a native browser select element.
`paper-dropdown-menu` works with selectable content.
See: [Documentation](https://www.webcomponents.org/element/@polymer/paper-dropdown-menu),
[Demo](https://www.webcomponents.org/element/@polymer/paper-dropdown-menu/demo/demo/index.html).
## Usage
### Installation
```
npm install --save @polymer/paper-dropdown-menu
```
### In an html file
```html
import '@polymer/paper-dropdown-menu/paper-dropdown-menu.js';
import '@polymer/paper-item/paper-item.js';
import '@polymer/paper-listbox/paper-listbox.js';
allosaurus
brontosaurus
carcharodontosaurus
diplodocus
```
### In a Polymer 3 element
```js
import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-dropdown-menu/paper-dropdown-menu.js';
import '@polymer/paper-item/paper-item.js';
import '@polymer/paper-listbox/paper-listbox.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
allosaurus
brontosaurus
carcharodontosaurus
diplodocus
`;
}
}
customElements.define('sample-element', SampleElement);
```
## Contributing
If you want to send a PR to this element, here are
the instructions for running the tests and demo locally:
### Installation
```sh
git clone https://github.com/PolymerElements/paper-dropdown-menu
cd paper-dropdown-menu
npm install
npm install -g polymer-cli
```
### Running the demo locally
```sh
polymer serve --npm
open http://127.0.0.1:/demo/
```
### Running the tests
```sh
polymer test --npm
```