tree: eb1238b9298c0d38ce9649f9c019a40c99bf7980 [path history] [tgz]
  1. demo/
  2. test/
  3. .bower.json
  4. .gitignore
  5. .travis.yml
  6. bower.json
  8. index.html
  9. iron-iconset-svg.html

Build Status

Demo and API Docs


The iron-iconset-svg element allows users to define their own icon sets that contain svg icons. The svg icon elements should be children of the iron-iconset-svg element. Multiple icons should be given distinct id's.

Using svg elements to create icons has a few advantages over traditional bitmap graphics like jpg or png. Icons that use svg are vector based so they are resolution independent and should look good on any device. They are stylable via css. Icons can be themed, colorized, and even animated.


<iron-iconset-svg name="my-svg-icons" size="24">
      <g id="shape">
        <rect x="50" y="50" width="50" height="50" />
        <circle cx="50" cy="50" r="50" />

This will automatically register the icon set “my-svg-icons” to the iconset database. To use these icons from within another element, make a iron-iconset element and call the byId method to retrieve a given iconset. To apply a particular icon inside an element use the applyIcon method. For example:

iconset.applyIcon(iconNode, 'car');