All Projects → pedronauck → Reicons

pedronauck / Reicons

💅 Bundle your SVG into a fully customized React components

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Reicons

Webfont
Awesome generator of webfont
Stars: ✭ 170 (+54.55%)
Mutual labels:  cli, icons, svg-icons
Awesome Icons
A curated list of awesome Web Font Icons
Stars: ✭ 758 (+589.09%)
Mutual labels:  icons, svg-icons
Alfred Font Awesome Workflow
🎩 Font Awesome workflow for Alfred
Stars: ✭ 714 (+549.09%)
Mutual labels:  icons, svg-icons
Unicons
1000+ Pixel-perfect vector icons and Iconfont for your next project.
Stars: ✭ 911 (+728.18%)
Mutual labels:  icons, svg-icons
Icons
All SVG icons available on http://game-icons.net
Stars: ✭ 598 (+443.64%)
Mutual labels:  icons, svg-icons
React Native Make
A collection of everyday React Native CLI tools
Stars: ✭ 606 (+450.91%)
Mutual labels:  cli, icons
Mono Icons
Stars: ✭ 899 (+717.27%)
Mutual labels:  icons, svg-icons
Pixo
Convert SVG icons into React components
Stars: ✭ 371 (+237.27%)
Mutual labels:  cli, icons
Boxicons
High Quality web friendly icons
Stars: ✭ 1,104 (+903.64%)
Mutual labels:  icons, svg-icons
Phosphor Icons
A flexible icon family for the web
Stars: ✭ 56 (-49.09%)
Mutual labels:  icons, svg-icons
Hybicon
Hybrid SVG icons
Stars: ✭ 62 (-43.64%)
Mutual labels:  icons, svg-icons
Evil Icons
Simple and clean SVG icon pack with the code to support Rails, Sprockets, Node.js, Gulp, Grunt and CDN
Stars: ✭ 4,944 (+4394.55%)
Mutual labels:  icons, svg-icons
Ant Design Icons
⭐ Ant Design SVG Icons
Stars: ✭ 484 (+340%)
Mutual labels:  icons, svg-icons
Browser Logos
🗂 High resolution web browser logos
Stars: ✭ 5,538 (+4934.55%)
Mutual labels:  icons, svg-icons
Jam
Jam icons is a set of SVG icons designed for web projects, illustrations, print projects, etc. Licensed under MIT
Stars: ✭ 398 (+261.82%)
Mutual labels:  icons, svg-icons
Vue Unicons
1000+ Pixel-perfect svg icons for your next project as Vue components
Stars: ✭ 828 (+652.73%)
Mutual labels:  icons, svg-icons
Phosphor React
A flexible icon family for React
Stars: ✭ 97 (-11.82%)
Mutual labels:  icons, svg-icons
Colorls
A Ruby gem that beautifies the terminal's ls command, with color and font-awesome icons. 🎉
Stars: ✭ 3,896 (+3441.82%)
Mutual labels:  cli, icons
Icons Flat Osx
Free Flat icons For OSX
Stars: ✭ 366 (+232.73%)
Mutual labels:  icons, svg-icons
React Icomoon
It allows you to simply view the icons in the selection.json file provided by Icomoon.
Stars: ✭ 48 (-56.36%)
Mutual labels:  icons, svg-icons

GitHub release

🤔   What is it?

If you work with React, you know that the library enables you to manage and use your icons in a lot a ways. This is good because you have flexibility to manage them as you want. So, in many cases this workflow can become a manual and massive process that you need to do so many times.

Reicons is a simple CLI tool that helps you to manage and use your icons quickly and easily.

👌   Advantages

  • [x] Require your icons as a simple React component
  • [x] Customize your icons with just css or inline styles
  • [x] Resize them in a prop way
  • [x] No .svg, .png or .jpg inside your bundle

That's great no? See more information above about how to use!

🔌   Install

The first thing that you need to do to use Reicons is install it globally or as a dependency at your project:

$ yarn [global] add reicons

After that you can see it working:

$ reicons --help

reicons -p [<package-dir:package-prefix>] -s <dir> -b <dir>

Options:
  --version       Show version number                     [boolean]
  --packages, -p  Your svg icons packages                 [array]
  --src, -s       Directory with the icons folder         [string]
  --build, -b     Build directory                         [string]
  --help          Show help                               [boolean]

💻   Example

Let's use the default example folder as example. There's we have an images folder that have two folders font-awesome and icons with a lot of svg files inside. So, we want to build our components at folder components/Icons. To do that, we can run:

$ cd example/default
$ reicons -p font-awesome:fa icons:ic -s images -b components/Icons

After this command, Reicons will generate our components in a folder structure like that:

.
└── components
    └── Icons
        └── index.js

With that you can just import your icons as a simple React component:

import { FaBook } from './components/Icons';

const App = () => (
  <div>
    <FaBook />
  </div>
);

or import the entiry bundled icons and define what you want passing a prop name

import Icon from './components/Icons';

const App = () => (
  <div>
    <Icon name="FaBook" />
  </div>
);

⚙   Usage

You need to know just few things to use the tool. As you've seen above, Reicons need to read a list of svg icons and know where you want to bundle your components.

So, to bundle your icons you need to pass three arguments: --package, --src and --build.

--package

One or more packages that you will use as icons. This argument has a default style to write, because we need it to find and create your svg files.

The default style to write your package is: <package-directory>:<package-prefix>

The package-directory is the folder name of your svg icons and the package-prefix is the name that we will use to prefix your components.

--src

The source directory when your packages folder is.

--build

The build directory when you want to create your components.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].