Skip to content

Material icon vanilla custom element for displaying Material Icons in a page

License

Notifications You must be signed in to change notification settings

ava-cassiopeia/mtrl-icon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mtrl-icon Custom Element

npm version

Material Icons Version: v31

Vanilla custom element that displays Google Material icons in your page.


Installation

To install, run:

npm i mtrl-icon

Then, either import the file directly with:

<script src="path/to/node_modules/mtrl-icon/src/mtrl-icon.js" defer></script>

or, include it in your webpack (or similar) build:

import "mtrl-icon";

Usage

Once installed, simply use with:

<mtrl-icon name="done"></mtrl-icon>

Where the name attribute is any valid Material icon name. See here for a list of icons.

Known Issues, Potential Gotchas

  • The Material icon font face is loaded from the Google Fonts CDN. It is currently not possible to load a local instance of the Material set. Please open an issue if you need this feature.
  • Due to a potential bug, the @font-face for Material Icons is elevated to the global CSS scope. See this article by Rob Dodson for more information.

Legal

Material Icons by Google - (License Information)

About

Material icon vanilla custom element for displaying Material Icons in a page

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published