@material-ui/icons
Material Design Svg Icons converted to Material-UI React components.
Last updated a month ago by oliviertassinari .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @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

You can use material.io/tools/icons to find a specific icon. When importing an icon, keep in mind that the names of the icons are PascalCase, for instance:

  • delete is exposed as @material-ui/icons/Delete
  • delete forever is exposed as @material-ui/icons/DeleteForever

For "themed" icons, append the theme name to the icon name. For instance with the

  • The Outlined delete icon is exposed as @material-ui/icons/DeleteOutlined
  • The Rounded delete icon is exposed as @material-ui/icons/DeleteRounded
  • The Two Tone delete icon is exposed as @material-ui/icons/DeleteTwoTone
  • The Sharp delete icon is exposed as @material-ui/icons/DeleteSharp

There are three exceptions to this rule:

  • 3d_rotation is exposed as @material-ui/icons/ThreeDRotation
  • 4k is exposed as @material-ui/icons/FourK
  • 360 is exposed as @material-ui/icons/ThreeSixty

Imports

  • 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 this 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. It may also impact Hot Module Reload performance.

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>.

We have built a jscodeshift codemod to help you upgrade

Documentation

The documentation

Current Tags

  • 4.2.1                                ...           latest (a month ago)
  • 4.0.0-rc.0                                ...           next (2 months ago)

25 Versions

  • 4.2.1                                ...           a month ago
  • 4.2.0                                ...           a month ago
  • 4.1.0                                ...           a month ago
  • 4.0.1                                ...           2 months ago
  • 4.0.0                                ...           2 months ago
  • 4.0.0-rc.0                                ...           2 months ago
  • 4.0.0-beta.0                                ...           3 months ago
  • 4.0.0-alpha.8                                ...           3 months ago
  • 4.0.0-alpha.1                                ...           5 months ago
  • 4.0.0-alpha.0                                ...           5 months ago
  • 3.0.2                                ...           6 months ago
  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 2.0.0-beta.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 1.0.0-rc.0                                ...           a year ago
  • 1.0.0-beta.43                                ...           a year ago
  • 1.0.0-beta.42                                ...           a year ago
  • 1.0.0-beta.41 [deprecated]           ...           a year ago
Downloads
Today 2
This Week 168
This Month 3,544
Last Day 166
Last Week 1,139
Last Month 4,378
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1061)

Copyright 2014 - 2017 © taobao.org |