@micimize/material-ui-icons
Material Design Svg Icons converted to Material-UI React components.
Last updated 2 years ago by micimize .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @micimize/material-ui-icons 
SYNC missed versions from official npm registry.

@material-ui/icons

This package provides the Google Material icons packaged as a set of React components.

Installation

Install the package in your project directory with:

npm install @material-ui/icons

These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI.

If you are not already using Material-UI in your project, you can add it with:

// with npm
npm install @material-ui/core

// with yarn
yarn add @material-ui/core

Usage

The import path for each Material icon component includes the icon name in PascalCase.

For example to use the 'access alarm' icon component, import @material-ui/icons/AccessAlarm. For "themed" icons, append the theme name to the icon name, for example AccessAlarmOutlined.

Note, there are three exceptions:

  • '3d rotation' is named ThreeDRotation
  • '4k' is named FourK
  • '360' is named ThreeSixty

Examples

  • If your environment doesn't support tree-shaking, the recommended way to import the icons is the following:
import AccessAlarmIcon from '@material-ui/icons/AccessAlarm';
import ThreeDRotation from '@material-ui/icons/ThreeDRotation';
  • If your environment support tree-shaking you can also import the icons that way:
import { AccessAlarm, ThreeDRotation } from '@material-ui/icons';

Note: Importing named exports in this way will result in the code for every icon being included in your project, so is not recommended unless you configure tree-shaking.

Upgrading

If you are upgrading an existing project from Material-UI 0.x.x, you will need to revise the import paths from material-ui/svg-icons/<category>/<icon-name> to @material-ui/icons/<IconName>.

Here's a jscodeshift codemod to help you upgrade.

Current Tags

  • 2.0.0-rn-alpha.4                                ...           latest (2 years ago)

4 Versions

  • 2.0.0-rn-alpha.4                                ...           2 years ago
  • 2.0.0-rn-alpha.3                                ...           2 years ago
  • 2.0.0-rn-alpha.2                                ...           2 years ago
  • 2.0.0-rn-alpha.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |