All Projects → ambar → reiconify

ambar / reiconify

Licence: other
Convert SVG icons to React components eg.: https://ambar.li/reiconify/md.icons/#/Browse

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to reiconify

svg-gobbler
Open source browser extension that makes designing and developing easier by finding, processing, exporting, optimizing, and managing SVG content.
Stars: ✭ 272 (+1500%)
Mutual labels:  svgo, svg2react, svgr
Svgr
Transform SVGs into React components 🦁
Stars: ✭ 8,263 (+48505.88%)
Mutual labels:  svgo, svg2react, svg-to-react
A File Icon Idea
Atom File Icons plugin for IntelliJ IDEA products
Stars: ✭ 90 (+429.41%)
Mutual labels:  material, icons
Material Design Icons
Material Design Icons
Stars: ✭ 90 (+429.41%)
Mutual labels:  material, icons
Material Design Icons
Material Design icons by Google
Stars: ✭ 44,551 (+261964.71%)
Mutual labels:  material, icons
Android Dev
⚡️ Curated list of resources for Android app development. Prepare for battle!
Stars: ✭ 44 (+158.82%)
Mutual labels:  material, icons
Youtube Play Icon
Material style morphing play-pause drawable for Android
Stars: ✭ 57 (+235.29%)
Mutual labels:  material, icons
Notion Icons 2.0
Create a more vibrant and modern workspace. Use Github Issues to request more Icons.
Stars: ✭ 93 (+447.06%)
Mutual labels:  material, icons
Iconshowcase
Full-of-features, easy-to-customize, free and open source, Material Design dashboard for icon packs.
Stars: ✭ 91 (+435.29%)
Mutual labels:  material, icons
La Capitaine Icon Theme
La Capitaine is an icon pack designed to integrate with most desktop environments. The set of icons takes inspiration from the latest iterations of macOS and Google's Material Design.
Stars: ✭ 1,858 (+10829.41%)
Mutual labels:  material, icons
Styled Icons
💅 Popular icon packs like Font Awesome, Material Design, and Octicons, available as React Styled Components
Stars: ✭ 1,878 (+10947.06%)
Mutual labels:  material, icons
Iconshowcase Dashboard
A full-of-features, easy-to-customize, free and open source, Material Design dashboard for icon packs.
Stars: ✭ 197 (+1058.82%)
Mutual labels:  material, icons
Blueprint
Free, feature-rich, easily customizable Android dashboard for icon packs
Stars: ✭ 389 (+2188.24%)
Mutual labels:  material, icons
Circle Flags
A collection of 300+ minimal circular SVG country flags
Stars: ✭ 139 (+717.65%)
Mutual labels:  icons, svgo
Mahapps.metro.iconpacks
Awesome icon packs for WPF and UWP in one library
Stars: ✭ 1,157 (+6705.88%)
Mutual labels:  material, icons
Mdi React
Material Design Icons for React/Preact packaged as single components
Stars: ✭ 117 (+588.24%)
Mutual labels:  material, icons
Android Switchicon
Google launcher-style implementation of switch (enable/disable) icon
Stars: ✭ 2,337 (+13647.06%)
Mutual labels:  material, icons
Rplibs
Refs.cn 原型设计元件库,基于Axure RP 10/9/8,支持 Android、Apple、Windows、微信,移动、桌面平台的应用和网站原型设计。五年历程 2.6k+ star,感谢大家使用。
Stars: ✭ 2,622 (+15323.53%)
Mutual labels:  material, icons
graphicon
A Vue.js plugin/component to help you manage your icons seamlessly
Stars: ✭ 12 (-29.41%)
Mutual labels:  icons
social-logos
A repository of all the social logos we use on WordPress.com
Stars: ✭ 110 (+547.06%)
Mutual labels:  icons

reiconify

Convert SVG icons to React components.

Features

  • Custom component templates, includes base class.
  • Export both ES modules and CommonJS modules.
  • Provide center prop for aligning icon with text,see how it works.
  • Provide dev tool for generating static icon site.
  • Generate unique IDs for SVG elements if needed.
  • Format codes with Prettier

Install

npm install reiconify-cli --save-dev

CLI Options

reiconify [options] [files]

Options:
  --version  Show version number                                       [boolean]
  --src      Build JSX source files                   [boolean] [default: false]
  --src-dir  JSX output directory                      [string] [default: "src"]
  --es       Build ES module files                    [boolean] [default: false]
  --es-dir   ES output directory                        [string] [default: "es"]
  --cjs      Build CommonJS files                     [boolean] [default: false]
  --cjs-dir  CommonJS output directory                 [string] [default: "cjs"]
  --serve    Serve source icons                       [boolean] [default: false]
  --static   Build static site                        [boolean] [default: false]
  -h         Show help                                                 [boolean]

Configuration File

Add reiconify.config.js(optional) to your project:

module.exports = {
  template: Function,
  baseTemplate: Function,
  filenameTemplate: Function,
  defaultProps: {},
  baseClassName: 'Icon',
  baseDefaultProps: {
    viewBox: '0 0 24 24',
  },
  svgoPlugins: [
    {
      removeAttrs: {attrs: ['fill', 'svg:(viewBox)']},
    },
  ],
}

CLI Usage

Add npm scripts:

{
  "name": "my-icons",
  "main": "cjs/index.js",
  "module": "es/index.js",
  "files": ["src", "es", "cjs"],
  "scripts": {
    "start": "reiconify --serve",
    "build": "reiconify --src --es --cjs icons/*.svg"
  }
}

Structure SVG files:

icons
├── check.svg
├── thumb-up.svg
└── ...

Build icons:

npm run build

Import icons:

import * as Icons from 'my-icons'

<Icons.Check />
<Icons.ThumbUp size={20} fill={'#rgb'} />

API Usage

import {transform} from 'reiconify'

const code = transform(svg, {format: 'esm', baseName: 'base-icon'})
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].