PolymerElements/paper-checkbox
Fork: 64 Star: 58 (更新于 1970-01-01 00:00:00)
license: 暂无
Language: HTML .
A Material Design checkbox
最后发布版本: v2.0.4 ( 2018-04-13 06:09:35)
<paper-checkbox>
paper-checkbox
is a button that can be either checked or unchecked. User can
tap the checkbox to check or uncheck it. Usually you use checkboxes to allow
user to select multiple options from a set. If you have a single ON/OFF option,
avoid using a single checkbox and use paper-toggle-button
instead.
See: Documentation, Demo.
Usage
Installation
npm install --save @polymer/paper-checkbox
In an HTML file
<html>
<head>
<script type="module">
import '@polymer/paper-checkbox/paper-checkbox.js';
</script>
</head>
<body>
<paper-checkbox>Unchecked</paper-checkbox>
<paper-checkbox checked>Checked</paper-checkbox>
<paper-checkbox disabled>Disabled</paper-checkbox>
</body>
</html>
In a Polymer 3 element
import {PolymerElement} from '@polymer/polymer/polymer-element.js';
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
import '@polymer/paper-checkbox/paper-checkbox.js';
class ExampleElement extends PolymerElement {
static get template() {
return html`
<paper-checkbox>Unchecked</paper-checkbox>
<paper-checkbox checked>Checked</paper-checkbox>
<paper-checkbox disabled>Disabled</paper-checkbox>
`;
}
}
customElements.define('example-element', ExampleElement);
Contributing
If you want to send a PR to this element, here are the instructions for running the tests and demo locally:
Installation
git clone https://github.com/PolymerElements/paper-checkbox
cd paper-checkbox
npm install
npm install -g polymer-cli
Running the demo locally
polymer serve --npm
open http://127.0.0.1:<port>/demo/
Running the tests
polymer test --npm
最近版本更新:(数据更新于 1970-01-01 00:00:00)
2018-04-13 06:09:35 v2.0.4
2018-03-30 03:23:21 v2.0.3
2018-01-25 03:04:29 v2.0.2
2017-07-13 06:40:21 v2.0.1
2017-05-16 06:51:08 v2.0.0
2016-11-29 09:01:33 v1.4.2
2016-09-30 11:10:21 v1.4.1
2016-08-09 08:50:09 v1.4.0
2016-07-15 01:53:12 v1.3.0
2016-07-12 02:26:46 v1.2.2
PolymerElements/paper-checkbox同语言 HTML最近更新仓库
2024-11-05 08:24:08 windmill-labs/windmill
2024-10-31 19:20:40 squidfunk/mkdocs-material
2024-10-26 01:50:50 nova-video-player/aos-AVP
2024-10-25 17:35:07 Tencent/tdesign-miniprogram
2024-09-30 10:57:08 mlick/libcimbar-web
2024-09-13 22:39:58 Unstructured-IO/unstructured