svg-reacticons

0.3.3 • Public • Published

svg-reacticons

This package provides SVG icons packaged as a group of React components.

Installation

Install the package in your project directory with:

npm install svg-reacticons

Usage

When importing an icon, keep in mind that the names of the icons are PascalCase, for instance:

  • microwave is exposed as svg-reacticons/icons/MicrowaveOutlined
  • truck is exposed as svg-reacticons/icons/TruckOutlined

Imports

  • If your environment doesn't support tree-shaking, the recommended way to import the icons is the following:
import MicrowaveIcon from '@material-ui/icons/MicrowaveOutlined';
import TruckIcon from '@material-ui/icons/TruckOutlined';
  • 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.

Readme

Keywords

Package Sidebar

Install

npm i svg-reacticons

Weekly Downloads

0

Version

0.3.3

License

MIT

Unpacked Size

325 kB

Total Files

107

Last publish

Collaborators

  • macolon