Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
material-design-icons-iconfont
Advanced tools
The material-design-icons-iconfont npm package provides a convenient way to include Material Design icons in your web projects. It offers a collection of icons that follow the Material Design guidelines, which can be easily integrated into your HTML and CSS.
Include Icons via CSS
You can include the Material Design icons in your project by adding a link to the CSS file in your HTML. This makes all the icons available for use in your web pages.
<link href="https://cdn.jsdelivr.net/npm/material-design-icons-iconfont@6.1.0/dist/material-design-icons.css" rel="stylesheet">
Use Icons in HTML
Once the CSS is included, you can use the icons in your HTML by adding an <i> element with the class 'material-icons' and the name of the icon you want to use as its content.
<i class="material-icons">face</i>
Styling Icons with CSS
You can style the icons using CSS. For example, you can create a class to change the size and color of the icons.
.icon-large { font-size: 48px; color: red; }
Font Awesome is a popular icon set and toolkit that provides a wide range of icons. It offers more icons than material-design-icons-iconfont and includes both free and pro versions. Font Awesome icons can be used in a similar way by including the CSS and using the appropriate classes.
Ionicons is an open-source icon set designed for use with Ionic Framework, but it can be used in any web project. It offers a different style of icons compared to Material Design and includes a variety of icons suitable for mobile and web applications.
Bootstrap Icons is an icon library designed to work seamlessly with Bootstrap. It provides a set of icons that match the design language of Bootstrap components. Like material-design-icons-iconfont, it can be included via CSS and used in HTML.
MDIDX (this repository) is a ~fork (+ fixes) of Google's Material Design icons repository. Sadly, Google allocates low maintenance and low support for issues reported by software developers having trouble using the Material Design icons library.
MDIDX helps modern web developers to use and include the (awesome) Material Design icons library in their project.
using npm
npm install material-design-icons-iconfont --save
Using scss
Import fonts and variables in your project
$material-design-icons-font-directory-path: '~material-design-icons-iconfont/dist/fonts/';
@import '~material-design-icons-iconfont/src/material-design-icons';
Customize your own classes
access material variable with Sass mixins:
.my-face {
@include material-icon('face');
}
# or
.my-face:before {
content: material-icons-content('face');
}
Performance -
When you checkout Google's original repository ( via git, npm and bower) you experience an unwanted delay. This checkout delay is caused by thousands of separate source graphic svg,png,...
files.
Needless to say that these file are irrelevant for the average developer's purposes and cause build congestion (especially when using in CI systems)
In this fork all irrelevant files have been removed while keeping only the required files.
SCSS Support - Modern developers need support for scss
. You can customize the referenced font's files filename and path
Maintenance - The original repository's release has missing icons that should be included according to https://material.io/tools/icons
Configure environment
Install nodejs on your environemt (> 7.6 for async await)
running build
npm install
npm run build
FAQs
Material Design Icons DX
The npm package material-design-icons-iconfont receives a total of 207,472 weekly downloads. As such, material-design-icons-iconfont popularity was classified as popular.
We found that material-design-icons-iconfont demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.