Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polymer/iron-icon

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymer/iron-icon

An element that supports displaying an icon

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
decreased by-5.16%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

Demo and API Docs

##<iron-icon>

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

Example using src:

<iron-icon src="star.png"></iron-icon>

Example setting size to 32px x 32px:

<iron-icon class="big" src="big_star.png"></iron-icon>

<style is="custom-style">
  .big {
    --iron-icon-height: 32px;
    --iron-icon-width: 32px;
  }
</style>

The iron elements include several sets of icons. To use the default set of icons, import iron-icons.html and use the icon attribute to specify an icon:

<link rel="import" href="/components/iron-icons/iron-icons.html">

<iron-icon icon="menu"></iron-icon>

To use a different built-in set of icons, import the specific iron-icons/<iconset>-icons.html, and specify the icon as <iconset>:<icon>. For example, to use a communication icon, you would use:

<link rel="import" href="/components/iron-icons/communication-icons.html">

<iron-icon icon="communication:email"></iron-icon>

You can also create custom icon sets of bitmap or SVG icons.

Example of using an icon named cherry from a custom iconset with the ID fruit:

<iron-icon icon="fruit:cherry"></iron-icon>

See iron-iconset and iron-iconset-svg for more information about how to create a custom iconset.

See the iron-icons demo to see the icons available in the various iconsets.

Styling

The following custom properties are available for styling:

Custom propertyDescriptionDefault
--iron-icon-widthWidth of the icon24px
--iron-icon-heightHeight of the icon24px
--iron-icon-fill-colorFill color of the svg iconcurrentcolor
--iron-icon-stroke-colorStroke color of the svg iconnone

Keywords

FAQs

Package last updated on 02 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc