JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 110240
  • Score
    100M100P100Q151961F
  • License MIT

React Dist for Material Design Icons

Package Exports

  • @mdi/react

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mdi/react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React - Material Design Icons

Material Design Icons can be used in React with a custom component or with the one provided in this module.

npm install @mdi/react --save-dev

Props

import React, { Component } from 'react'
import Icon from '@mdi/react'
import { mdiAccount } from '@mdi/js'

class App extends Component {
  render() {
    return (
      <Icon path={mdiAccount}
        size={1}
        horizontal
        vertical
        rotate={90}
        color="red"
        spin/>
    )
  }
} 

Props

Prop PropTypes Default Details
path string required SVG path data. Usually from @mdi/js
size number, string 1 {size * 1.5}rem
horizontal bool false Flip Horizontal
vertical bool false Flip Vertical
rotate number 0 degrees 0 to 360
color string #000 rgb() / rgba() / #000
spin bool, number false true = 2s, {spin}s