Modus Icons

LICENSE npm Version npm Downloads

Modus Icons using CSS custom properties and SVG masks.

How to use

  1. Include one or more stylesheets (regular, fill, and/or duotone):
<link rel="stylesheet" href="modus-icons-regular.min.css">
 <link rel="stylesheet" href="modus-icons-fill.min.css">
 <link rel="stylesheet" href="modus-icons-duotone.min.css">

Each icon is exposed as a CSS variable --modus-icon-<name> whose value is a url("data:image/svg+xml;utf8,...") data URI.

Can be used just like an icon font, with the class name being the icon name

<i class="modus-icon-factory"></i>

Can be styled with CSS

.modus-icon-factory {
  color: hotpink;
}

CSS variables can be used dynamically

.modus-icon-lightbulb {
   color: hotpink;
 }
 .modus-icon-lightbulb:hover {
   mask-image: var(--modus-icon-lightbulb-fill);
 }
 .modus-icon-lightbulb:active {
   mask-image: var(--modus-icon-skull-fill);
 }

Loading…