Icons as a web component
One dependency-free <xerobi-icons> element gives any page access to all 70,000+ icons, with no framework required.
Install
From a CDN, with no build step:
<script src="https://cdn.jsdelivr.net/npm/@xerobi/icons-web@0.4.3"></script>Or from npm:
npm install @xerobi/icons-web
// once, anywhere in your app
import '@xerobi/icons-web';
Use an icon
<xerobi-icons name="house"></xerobi-icons>
<xerobi-icons name="heart" weight="fill" size="32" color="crimson" label="Favorite"></xerobi-icons>
Attributes
name, weight, size, color, mirrored and label. Icons are hidden from screen readers unless you set label, which becomes the accessible name.
Popular icons
- house
- magnifying-glass
- gear
- user
- bell
- heart
- star
- envelope
- shopping-cart
- calendar
- trash
- plus
- x
- check
- arrow-right
- download
- lock
- camera
Browse all 70,000+ iconsBrowse by category
Frequently asked questions
Does it work in Angular?
Yes. Add CUSTOM_ELEMENTS_SCHEMA to the module or standalone component that uses it, then use the element in templates.
Can I use it in WordPress?
Yes. Load the script once in your theme, then use the element in any block that accepts HTML.
How big is the script?
About 3 KB. Each icon is fetched the first time a page uses it, about 1 KB per icon and weight, and cached. For offline use, import @xerobi/icons-web/all, which holds every icon in every weight up front (about 23 MB).