@anypoint-web-components/anypoint-combobox

An input with drop down menu styled for Material Design and Anypoint platform.

Usage no npm install needed!

<script type="module">
  import anypointWebComponentsAnypointCombobox from 'https://cdn.skypack.dev/@anypoint-web-components/anypoint-combobox';
</script>

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.

Published on NPM

tests

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