• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2<!---
3
4This README is automatically generated from the comments in these files:
5iron-iconset-svg.html
6
7Edit those files, and our readme bot will duplicate them over here!
8Edit this file, and the bot will squash your changes :)
9
10-->
11
12[![Build Status](https://travis-ci.org/PolymerElements/iron-iconset-svg.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-iconset-svg)
13
14_[Demo and API Docs](https://elements.polymer-project.org/elements/iron-iconset-svg)_
15
16
17##&lt;iron-iconset-svg&gt;
18
19
20The `iron-iconset-svg` element allows users to define their own icon sets
21that contain svg icons. The svg icon elements should be children of the
22`iron-iconset-svg` element. Multiple icons should be given distinct id's.
23
24Using svg elements to create icons has a few advantages over traditional
25bitmap graphics like jpg or png. Icons that use svg are vector based so
26they are resolution independent and should look good on any device. They
27are stylable via css. Icons can be themed, colorized, and even animated.
28
29Example:
30
31    <iron-iconset-svg name="my-svg-icons" size="24">
32      <svg>
33        <defs>
34          <g id="shape">
35            <rect x="50" y="50" width="50" height="50" />
36            <circle cx="50" cy="50" r="50" />
37          </g>
38        </defs>
39      </svg>
40    </iron-iconset-svg>
41
42This will automatically register the icon set "my-svg-icons" to the iconset
43database.  To use these icons from within another element, make a
44`iron-iconset` element and call the `byId` method
45to retrieve a given iconset. To apply a particular icon inside an
46element use the `applyIcon` method. For example:
47
48    iconset.applyIcon(iconNode, 'car');
49
50
51