JSPM

  • Created
  • Published
  • Downloads 25920
  • Score
    100M100P100Q139235F
  • License Apache-2.0

IcoMoon for React

Package Exports

  • react-icomoon

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 (react-icomoon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React-IcoMoon

License

React-IcoMoon Logo

Demo

Install

npm install react-icomoon

Use +498 free icons. Visit the IcoMoon site to see the icon list.

https://icomoon.io/app/

Usage

import IcoMoon from "react-icomoon";
<IcoMoon icon="pencil" />
<IcoMoon icon={value ? "play" : "pause"} />

Custom IconSet

You can use the icons you selected on IcoMoon by downloading the selection.json file.

https://icomoon.io/app/

Declare

// icon.js
import React from "react";
import IcoMoon from "react-icomoon";
const iconSet = require("./selection.json");

const Icon = ({ ...props }) => {
  return <IcoMoon iconSet={iconSet} {...props} />;
};

export default Icon;

Use

import Icon from "./icon";

<Icon icon="focus" />