Skip to content

Latest commit

 

History

History

material-icons

@hrc/material-icons

version npm bundle size npm downloads

Simple component for Material Design Icons font in your React app.

Installation

npm install @hrc/material-icons @material-design-icons/font

Usage

  1. Import @material-design-icons/font in your entry file (example: src/main.jsx in Vite):

    import "@material-design-icons/font";

    [!NOTE] Check @material-design-icons/font docs for more info.

  2. Then, in your App.jsx or another file:

    import { Icon } from "@hrc/material-icons";
    
    export function PackageDemo() {
      return (
        <>
          <Icon name="lock" variant="outlined" size="small" />
          <Icon name="favorite" color="error" />
          <Icon name="face" color="secondary" />
          <Icon name="description" color="primary" size="large" />
        </>
      );
    }

Documentation