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

material-icons

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-icons

Material design icon font and CSS framework for self hosting the icons.

  • 0.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
185K
decreased by-4.89%
Maintainers
1
Weekly downloads
 
Created
Source

Material Icons

Material design icon font and CSS framework for self hosting the icons.

Note: This package contains only the icon font and required CSS. So it is considerably small compared to the official material-design-icons package and easy to install.

Installation

Download the latest release or install using npm:

npm install material-icons

Usage

Font files are present in the iconfont directory and can be imported using CSS.

Import the required CSS:

<link rel="stylesheet" href="/path/to/material-icons/iconfont/material-icons.css">

or import the SCSS:

$material-icons-font-path: '~material-icons/iconfont/';

@import 'material-icons/iconfont/material-icons.scss';

To display an icon use:

<span class="material-icons">face</span>

Available Sass variables:

$material-icons-codepoints: () !default; /* Sass map of icon names and codepoints */
$material-icons-font-path: '' !default;
$material-icons-font-name: 'MaterialIcons-Regular' !default;
$material-icons-font-size: 24px !default;
$material-icons-font-family: 'Material Icons' !default;

Available Sass mixins:

.material-icons {
  @include material-icons();
}

CSS Classes (Optional)

Alternatively you can use CSS classes to display an icon.

Note: This method is not recommended as it requires a large CSS file to be imported in addition to above files.

Import the required CSS:

<link rel="stylesheet" href="/path/to/material-icons/css/material-icons.min.css">

or import the SCSS:

$material-icons-css-prefix: 'mi';

@import 'material-icons/css/material-icons.scss';

To display an icon use:

<span class="mi mi-face"></span>

Available Sass variables:

$material-icons-css-prefix: 'mi' !default;
$material-icons-css-search: '_' !default;
$material-icons-css-replace: '-' !default; /* To replace '_' with '-' in CSS class names */

Available Sass mixins:

.mi-face {
  @include material-icon('face');
}

Available Icons

See material design icons.

Keywords

FAQs

Package last updated on 27 Mar 2018

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