New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

mdi-react-es

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdi-react-es

Material Design Icons for React

5.4.55
latest
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created

mdi-react-es npm package

Material Design Icons for React packaged as single components

Introduction

This repo is forked from mdi-react, but with modern ES module syntax.

Installation

npm install mdi-react-es
# or if you use Yarn
yarn add mdi-react-es

The version number of mdi-react-es is in sync with the original font.

Usage

Just search for an icon on materialdesignicons.com and look for its name.
The name translates to PascalCase followed by the suffix Icon in mdi-react-es.

For example the icons named alert and alert-circle:

import AlertIcon from 'mdi-react-es/AlertIcon';
import AlertCircleIcon from 'mdi-react-es/AlertCircleIcon';

const MyComponent = () => {
  return (
    <div>
      <AlertIcon />
      <AlertCircleIcon className="some-class" />
    </div>
  );
};

The icons get a class named mdi-icon attached for styling. You can also attach own additional classes with the className property.

FAQs

Package last updated on 05 Aug 2020

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