MyGit

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)

官方网址 GitHub网址

Published on NPM Build status Published on webcomponents.org

<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-21 05:18:22 nova-video-player/aos-AVP

2024-11-21 03:47:48 windmill-labs/windmill

2024-11-20 16:16:27 squidfunk/mkdocs-material

2024-11-13 21:10:48 Tencent/tdesign-miniprogram

2024-11-03 15:58:18 adityatelange/hugo-PaperMod

2024-09-30 10:57:08 mlick/libcimbar-web