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-dialogisu-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@haxtheweb/md-extra-icons@haxtheweb/mdi-iconset-svg@haxtheweb/lrn-icons@haxtheweb/social-media-iconssoniapanditatest-contact-dialogunity-core-betavaadin-flow-bom@kubex/cube-icon@leavittsoftware/manage-side-menu@logo-elements/icons@logo-elements/logo-elements-styles@lp-dev/html-input@longlost/app-file-system@longlost/app-images@longlost/app-inputs@longlost/app-map@longlost/app-settings@longlost/app-shell@longlost/app-account@longlost/app-camera@longlost/app-carousel@longlost/app-carousels@longlost/app-ecomm@longlost/checkout-pay@longlost/cms-events@longlost/drag-drop-files@longlost/ezf-shared@longlost/file-uploader@longlost/icon-to-spinner@longlost/leaflet-map@lftechnology/card-boxmumaa-dialog
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

8 years ago

3.0.0-pre.18

8 years ago

3.0.0-pre.17

8 years ago

3.0.0-pre.16

8 years ago

3.0.0-pre.15

8 years ago

3.0.0-pre.14

8 years ago

3.0.0-pre.13

8 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