Package Exports
- material-icons-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 (material-icons-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
material-icons-react
Introduction
This package provides a convinient react component for using Google's Material Icons in your react application.
Features
- Follows Material design guidelines
- Highly customizable
- Supports Material UI color pallet of the shelf.
Usage
Import module using the following statement.
import MaterialIcon, {colorPallet} from 'material-icons-react';
- Rendering an icon is straightforward.
<MaterialIcon icon="dashboard" />
<MaterialIcon icon="alarm_on" />
- Change the icon size by using the
size
property.
<MaterialIcon icon="dashboard" size='large' />
<MaterialIcon icon="dashboard" size={100} />
- Invert the icon by using the invert property.
<MaterialIcon icon="dashboard" invert />
- Make the icon inactivate by using the
inactive
property.
<MaterialIcon icon="dashboard" inactive />
- Change the color of an icon.
- Using Material UI color pallet.
<MaterialIcon icon="dashboard" color={colorPallet.amber._200} />
<MaterialIcon icon="dashboard" color={colorPallet.amber.A700} />
- Using a custom color.
<MaterialIcon icon="dashboard" color='#7bb92f' />
Icon size matrix
Alias | Size |
---|---|
tiny | 18px |
small | 24px |
medium | 36px |
large | 48px |
License
MIT