3.0.1 • Published 7 years ago

@polymer/iron-icon v3.0.1

Weekly downloads
28,345
License
BSD-3-Clause
Repository
github
Last release
7 years ago

Published on NPM Build status Published on webcomponents.org

<iron-icon>

The iron-icon element displays an icon. By default an icon renders as a 24px square.

See: Documentation, Demo.

Usage

Installation

npm install --save @polymer/iron-icon

In an HTML file

<html>
  <head>
    <script type="module">
      import '@polymer/iron-icon/iron-icon.js';
    </script>
  </head>
  <body>
    <iron-icon src="demo/location.png"></iron-icon>

    <!-- You can use an icon from an imported iconset. -->
    <script type="module">
      import '@polymer/iron-icons/iron-icons.js';
    </script>
    <iron-icon icon="search"></iron-icon>
  </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/iron-icon/iron-icon.js';

class ExampleElement extends PolymerElement {
  static get template() {
    return html`
      <iron-icon src="demo/location.png"></iron-icon>
    `;
  }
}

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/iron-icon
cd iron-icon
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
zagen-zagen@teipublisher/pb-components7contact-dialog2simple-material-table@infinitebrahmanuniverse/nolb-_pol@everything-registry/sub-chunk-731wysiwyg-e-forkwysiwyg-e-nofontvowo-submenu-dialog@belomx/paper-input-place@rpapeters/paper-autocomplete@rpc5102/course-cardisu-elementisu-elementsiron-swiper-3iron-iron-starjb-ratingisuwang-elementsimtiyaz-polymer-3-first-elementideahub-icon-toggleideahub-web-componentshomeassistant-frontend-racelandh2-elementslit-inputlive-localizerlogik-config-componentmaterial-components-elm-js-importskse-common-iconkse-common-uiks-common-ui@whcg/vaadin-lumo-styles@whcg/whcg-general-styles@whcg/whcg-header@vowo/vowo-img-cropper@vowo/vowo-submenu-dialog@vowo/fluid-form-elements@things-factory/process-modeller@things-factory/scene-chartjs@thuoe/mp4-video-player@ucd-lib/cork-cancel-button@ucd-lib/cork-icons@ucd-lib/cork-popup-button@ucd-lib/cork-search-box@ucd-lib/cork-toggle-panel@ucd-lib/cork-typeahead@ucd-lib/fin-icons@unicef-polymer/etools-upload@unicef-polymer/etools-data-table@unicef-polymer/etools-dropdown@unicef-polymer/etools-file@unicef-polymer/etools-filters@things-scene/chartjs@vic10us/paper-search-input@vaadin-component-factory/vcf-autosuggest@vaadin-component-factory/vcf-context-item@vaadin-component-factory/vcf-network@vaadin-component-factory/vcf-pwa-install-button@vaadin-component-factory/vcf-share-dialog@vaadin-component-factory/vcf-webshare-button@uxland/uxl-grid@vaadin/vaadin-core-shrinkwrap@vaadin/vaadin-shrinkwrap@uxland/no-content@uvalib/uvalib-search-box@uvalib/uvalib-theme@uvalib/uvalib-counts@teipublisher/pb-componentsa-number-fieldapp-menu-polymer3@google-web-components/google-signin@chronos/b7-gallery@01ht/ht-drawer-nav@01ht/ht-elements-cart@01ht/ht-elements-catalog@01ht/ht-elements-item@01ht/ht-image-slider@01ht/ht-item-editor@01ht/ht-account-settings@01ht/ht-chip@01ht/ht-storage@01ht/ht-user-avatar@aire-ux/aire-switch@aire-ux/aire-wizard@aire-ux/aire-code-panel@aire-ux/aire-overlay@advanced-rest-client/xml-viewer@advanced-rest-client/paper-chip@advanced-rest-client/paper-chip-input@advanced-rest-client/projects-menu@advanced-rest-client/response-error-view@advanced-rest-client/saved-menu@advanced-rest-client/anypoint-signin@advanced-rest-client/arc-request-settings-panel@advanced-rest-client/arc-view-settings-panel@advanced-rest-client/arc-data-settings-panel@advanced-rest-client/cookie-details@advanced-rest-client/history-panel@advanced-rest-client/arc-privacy-settings-panel@advanced-rest-client/error-message@cobre/cobre-collapse
3.0.1

7 years ago

3.0.0

7 years ago

3.0.0-pre.26

7 years ago

3.0.0-pre.25

7 years ago

3.0.0-pre.24

7 years ago

3.0.0-pre.23

7 years ago

3.0.0-pre.22

7 years ago

3.0.0-pre.21

7 years ago

3.0.0-pre.20

7 years ago

3.0.0-pre.19

7 years ago

3.0.0-pre.18

7 years ago

3.0.0-pre.17

7 years ago

3.0.0-pre.16

7 years ago

3.0.0-pre.15

7 years ago

3.0.0-pre.14

7 years ago

3.0.0-pre.13

7 years ago

3.0.0-pre.12

8 years ago

3.0.0-pre.11

8 years ago

3.0.0-pre.10

8 years ago

3.0.0-pre.8

8 years ago

3.0.0-pre.7

8 years ago

3.0.0-pre.6

8 years ago

3.0.0-pre.4

8 years ago

3.0.0-pre.3

8 years ago

3.0.0-pre.2

8 years ago

3.0.0-pre.1

8 years ago

1.0.12-pre.3

9 years ago

1.0.12-pre.2

9 years ago

1.0.12-pre.1

9 years ago

0.0.4

9 years ago

0.0.3

10 years ago

0.0.1

10 years ago