Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@polymer/iron-icon
Advanced tools
##<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.
The following custom properties are available for styling:
Custom property | Description | Default |
---|---|---|
--iron-icon-width | Width of the icon | 24px |
--iron-icon-height | Height of the icon | 24px |
--iron-icon-fill-color | Fill color of the svg icon | currentcolor |
--iron-icon-stroke-color | Stroke color of the svg icon | none |
FAQs
An element that supports displaying an icon
The npm package @polymer/iron-icon receives a total of 27,927 weekly downloads. As such, @polymer/iron-icon popularity was classified as popular.
We found that @polymer/iron-icon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.