@anypoint-web-components/anypoint-combobox
v0.2.3
Published
An input with drop down menu styled for Material Design and Anypoint platform.
Downloads
18
Readme
Deprecated
This component has been moved to anypoint-web-components/awc
.
A combo box is a combination of a text field and the autocomplete element to provide an UI of an input field with suggestions.
Usage
Installation
npm install --save @anypoint-web-components/anypoint-combobox
In a LitElement
import { LitElement, html } from 'lit-element';
import '@anypoint-web-components/anypoint-combobox/anypoint-combobox.js';
class SampleElement extends PolymerElement {
render() {
const suggestions = ['a', 'b', c];
return html`
<anypoint-combobox
.source="${suggestions}"
@value-changed="${this._valueHandler}">on/off</anypoint-combobox>
`;
}
_valueHandler(e) {
this.value = e.detail.value;
}
}
customElements.define('sample-element', SampleElement);
Development
git clone https://github.com/anypoint-web-components/anypoint-combobox
cd anypoint-combobox
npm install
Running the demo locally
npm start
Running the tests
npm test