PolymerElements/iron-iconset-svg

Name: iron-iconset-svg

Owner: PolymerElements

Description: Represents a source of icons expressed as a collection of inline SVGs

Created: 2015-04-16 04:18:42.0

Updated: 2018-05-23 08:21:24.0

Pushed: 2018-05-23 02:29:43.0

Homepage: https://elements.polymer-project.org/elements/iron-iconset-svg?view=demo:demo/index.html

Size: 204

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build status

Demo and API docs

<iron-iconset-svg>

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.

Example:

n-iconset-svg name="my-svg-icons" size="24">
vg>
<defs>
  <g id="shape">
    <rect x="12" y="0" width="12" height="24" />
    <circle cx="12" cy="12" r="12" />
  </g>
</defs>
svg>
on-iconset-svg>

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:

set.applyIcon(iconNode, 'car');

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.