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-12-22 12:33:20 Qexo/Qexo

2024-12-21 22:03:42 nova-video-player/aos-AVP

2024-12-19 12:37:19 Tencent/tdesign-miniprogram

2024-12-16 18:24:30 squidfunk/mkdocs-material

2024-12-11 02:46:08 windmill-labs/windmill

2024-12-10 15:24:15 web-infra-dev/midscene