Anypoint and Material DS styled checkbox
npm install @anypoint-web-components/anypoint-checkboxThis component has been moved to anypoint-web-components/awc.
====
Anypoint and Material DS styled checkbox.


At the moment of publication of the element, the spec allowing custom elements to be accepted by the element (Form-associated custom elements) is work in progress.
Custom form element has to be used with custom elements that needs to be registered in a form. We suggest using iron-form.
This element supports form-associated custom elements spec that allows to use custom elements with and elements. A browser may not yet support this feature.
If the API is enable then the form element returns anypoint-checkbox is form.elements list and collect value of the control when submitted.
Checkboxes should be used with forms to select one of the available options. Unlike switch button which toggle action selects the control and immediately executes system related action, change of state of a checkbox does not carry any other related action than selecting an option.
In other words, when change of the state of the control triggers change in the UI a switch button should be used instead of a checkbox.
``sh`
npm i --save @anypoint-web-components/anypoint-checkbox
`html`
`js
import { LitElement, html } from 'lit-element';
import '@anypoint-web-components/anypoint-checkbox/anypoint-checkbox.js';
class SimpleElement extends ControlStateMixin(ButtonStateMixin(LitElement)) {
render() {
return html
;`
}
}
window.customElements.define('simple-element', SimpleElement);
`sh`
npm i --save @polymer/iron-form
`html`
`sh`
git clone https://github.com/anypoint-web-components/anypoint-checkbox
cd anypoint-checkbox
npm install
`sh`
npm start
`sh``
npm test