Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shamin/figma-react-icons
CLI to generate react icon component files from figma
https://github.com/shamin/figma-react-icons
cli figma figma-react-icons react
Last synced: 3 months ago
JSON representation
CLI to generate react icon component files from figma
- Host: GitHub
- URL: https://github.com/shamin/figma-react-icons
- Owner: shamin
- License: mit
- Created: 2020-11-05T08:18:32.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T04:34:08.000Z (about 4 years ago)
- Last Synced: 2024-10-16T05:53:16.046Z (4 months ago)
- Topics: cli, figma, figma-react-icons, react
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# figma-react-icons
[![npm version](https://badge.fury.io/js/figma-react-icons.svg)](https://badge.fury.io/js/figma-react-icons)
CLI to genereate react icon component files from figma
## Install
```bash
$ npm install --global figma-react-icons
```## Prerequesties
You will need to have a figma access token, you can get it from [here](https://www.figma.com/developers/api#authentication).## How to use
- Create a figma file with icons like this [file](https://www.figma.com/file/B1v7c2kZ8EnvF3tLlxmT69/how-to-delivery-svg-from-figma-to-react?node-id=0%3A1).
- Open the project in a browser to get `file id` and `node id` from the figma url. You need to select the artboard to view the node id.
For example, for a url like this,
```
https://www.figma.com/file/B1v7c2kZ8EnvG3tLlxmT89/how-to-delivery-svg-from-figma-to-react?node-id=2%3A3
```The file id is `B1v7c2kZ8EnvG3tLlxmT89` and the node id is `2%3A3`.
- Use the cli to generate the icon component files.
```bash
$ figma-react-icons -t $FIGMA_TOKEN -o -f -n
```## Inspiration
This is a CLI version of [how-to-deliver-svg-icons-to-react](https://github.com/vborodulin/how-to-deliver-svg-icons-to-react) created by [@vborodulin](https://github.com/vborodulin/how-to-deliver-svg-icons-to-react)