4.9.1 • Published 9 months ago

react-icons-ng v4.9.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

React Icons

npm

Elevate your React projects to new heights with react-icons-ng, an enhanced icon library derived from react-icons/react-icons. With a substantial addition of over 60,000 icons, our forked version surpasses the original repository in terms of versatility and variety. Leveraging the convenience of ES6 imports, react-icons-ng empowers you to effortlessly integrate only the icons that align with your project's needs. Embrace a seamless development experience and unlock the full potential of React icons with our impressive solution.

Installation (for standard modern project)

yarn add react-icons-ng
# or
npm install react-icons-ng --save

example usage

import { FaBeer } from "react-icons-ng/fa";

function Question() {
  return (
    <h3>
      Lets go for a <FaBeer />?
    </h3>
  );
}

NOTE: each Icon package has it's own subfolder under react-icons-ng you import from.

For example, to use an icon from Material Design, your import would be: import { ICON_NAME } from 'react-icons-ng/md';

Icons

//: # START_VERSION

Icon LibraryLicenseVersionCount
Ant Design IconsMIT@ant-design/icons-svg@4.0.0-168-g6db0ecb789
BoxIconsMIT9ffa9136e8681886bb7bd2145cd4098717ce1c111634
Bootstrap IconsMITv1.10.5-30-gc83e8702592
css.ggMIT2.1.1704
Circum IconsMPL-2.0 licensev2.0.2-2-geeef620288
CooliconsCC BY 4.0 Licensev4.1-1-g1a92717442
CoreUI IconsMITv3.0.0-3-g4b1f387556
EOS IconsMITv5.4.0-4-ga21c4b9156
Font Awesome 5CC BY 4.0 License5.15.4-3-gafecf2a1612
Font Awesome 6CC BY 4.0 License6.4.22025
Flat Color IconsMITv1.0.2-27-g8eccbbb329
FeatherMITv4.29.0-4-gdb2364f287
Fluent System IconsMIT1.1.2104067
Github Octicons iconsMITv19.5.0272
US Government IconsSIL OFL 1.11.6.0-2-g1d9f467136
Game IconsCC BY 3.012920d6565588f0512542a3cb0cdfd36a497f9104040
Grommet-IconsApache License Version 2.0v4.11.0-1-g3de6204621
HeroiconsMITv2.0.18-1-geee05eb876
IconoirMITv6.11.01371
IcoMoon FreeCC BY 4.0 Licensed006795ede82361e1bac1ee76f215cf1dc51e4ca491
Ionicons 5MIT5.5.41332
Jam IconsMIT3.1.0-2-gc8501b1940
Icons8 Line AwesomeMITv1.2.1-10-g78a10121544
LucideISC0.265.0-3-g70cffa81236
MingCute iconsApache License Version 2.0v2.862452
Material Design iconsApache License Version 2.04.0.0-84-gb7d28b6c264341
Material Design icons 2Apache License Version 2.09363cbecde77f1de821e5799457e89b6b2e82c267334
OpenmojiCC BY-SA 4.014.0.0-220-g9782be94094
Phosphor IconsMITv2.0.2-2-gc67d7a87488
PolarisMIT@shopify/polaris-cli@0.2.29-17-g6c1633c574
Remix IconApache License Version 2.0v3.5.0-1-g3c4f3ff2537
Radix IconsMIT@radix-ui/react-icons@1.3.0-1-g94b3fcf318
Simple IconsCC0 1.0 Universal4.14.0-1524-gc40b2402634
Simple Line IconsMITv2.5.5189
Tabler IconsMITv2.30.0-9-ga8b3eb14601
Themify IconsMITv0.1.2-2-g9600186352
TypiconsCC BY-SA 3.0v2.1.2336
VS Code IconsCC BY 4.00.0.31-59-gc07d2e5426
Weather IconsSIL OFL 1.12.0.12-7-gbb80982219

Total Count of Icons: 66235

//: # END_VERSION

You can add more icons by submitting pull requests or creating issues.

Configuration

You can configure react-icons-ng props using React Context API.

Requires React 16.3 or higher.

import { IconContext } from "react-icons-ng";

<IconContext.Provider value={{ color: "blue", className: "global-class-name" }}>
  <div>
    <FaFolder />
  </div>
</IconContext.Provider>;
KeyDefaultNotes
colorundefined (inherit)
size1em
classNameundefined
styleundefinedCan overwrite size and color
attrundefinedOverwritten by other attributes
titleundefinedIcon description for accessibility

Adjustment CSS

From version 3, vertical-align: middle is not automatically given. Please use IconContext to specify className or specify an inline style.

Global Inline Styling

<IconContext.Provider value={{ style: { verticalAlign: 'middle' } }}>

Global className Styling

Component

<IconContext.Provider value={{ className: 'react-icons-ng' }}>

CSS

.react-icons {
  vertical-align: middle;
}

TypeScript native support

Dependencies on @types/react-icons-ng can be deleted.

Yarn

yarn remove @types/react-icons-ng

NPM

npm remove @types/react-icons-ng

Contributing

./build-script.sh will build the whole project. See also CI scripts for more information.

Development

yarn
cd packages/react-icons-ng
yarn fetch  # fetch icon sources
yarn build

Preview

cd packages/react-icons-ng
yarn fetch
yarn build

cd ../preview
yarn start

Demo

The demo is a Create React App boilerplate with react-icons-ng added as a dependency for easy testing.

cd packages/react-icons-ng
yarn fetch
yarn build

cd ../demo
yarn start

Why React SVG components instead of fonts?

SVG is supported by all major browsers. With react-icons-ng, you can serve only the needed icons instead of one big font file to the users, helping you to recognize which icons are used in your project.

Related Projects

Licence

MIT

  • Icons are taken from the other projects so please check each project licences accordingly.
4.8.5

10 months ago

4.8.4

12 months ago

4.8.3

12 months ago

4.9.1

9 months ago

4.8.2

12 months ago

4.8.2-snapshot.0

12 months ago

4.8.1-snapshot.2

12 months ago