@polymer/paper-icon-button
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

Published on NPM Build status Published on webcomponents.org

<paper-icon-button>

paper-icon-button is a button with an image placed at the center. When the user touches the button, a ripple effect emanates from the center of the button.

paper-icon-button does not include a default icon set. To use icons from the default set, include @polymer/iron-icons/iron-icons.js, and use the icon attribute to specify which icon from the icon set to use.

See: Documentation, Demo.

Usage

Installation

npm install --save @polymer/paper-icon-button

In an html file

<html>
  <head>
    <script type="module">
      import '@polymer/paper-icon-button/paper-icon-button.js';
      import '@polymer/iron-icons/iron-icons.js';
    </script>
  </head>
  <body>
    <paper-icon-button icon="favorite"></paper-icon-button>
  </body>
</html>

In a Polymer 3 element

import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-icon-button/paper-icon-button.js';
import '@polymer/iron-icons/iron-icons.js';

class SampleElement extends PolymerElement {
  static get template() {
    return html`
      <paper-icon-button icon="favorite"></paper-icon-button>
    `;
  }
}
customElements.define('sample-element', SampleElement);

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-icon-button
cd paper-icon-button
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

Dependencies (4)

Dev Dependencies (6)

Package Sidebar

Install

npm i @polymer/paper-icon-button

Weekly Downloads

9,637

Version

3.0.2

License

BSD-3-Clause

Unpacked Size

30.9 kB

Total Files

11

Last publish

Collaborators

  • aomarks
  • emarquez
  • sorvell
  • bicknellr
  • usergenic
  • polymer-devs
  • azakus
  • kevinpschaaf
  • justinfagnani