react-materials-icon

🍺 Hi there, material icons for react lovers <3, Thanks...

Usage no npm install needed!

<script type="module">
  import reactMaterialsIcon from 'https://cdn.skypack.dev/react-materials-icon';
</script>

README

react-materials-icon

🍺 Hi there, material icons for react lovers <3, Thanks...

NPM JavaScript Style Guide

Install

npm install --save react-materials-icon

npm i material-icons

Usage

In your Index.js ( main file ) import material icon css.

//import material-icon scss
import 'material-icons/iconfont/material-icons.css';
import React, { Component } from 'react'

//import MaterialReactIcon from react-materials-icon
import MaterialReactIcon from 'react-materials-icon'

class Example extends Component {
  render () {
    return (
      //And use wherever you want...
      <MaterialReactIcon icon="android" size="4" color="orange" />
    )
  }
}

Props

  • icon: pass icon name e.g -android material-icons
  • size: pass icon size size in rem
  • color: you can give any valid value i.e red, yellow, #fffff, #ff0000.

License

MIT © License