{"id":18510785,"url":"https://github.com/envato/create-react-icon","last_synced_at":"2025-04-09T04:33:23.797Z","repository":{"id":52421170,"uuid":"75571640","full_name":"envato/create-react-icon","owner":"envato","description":"Convert one or multiple svg files into React component","archived":false,"fork":false,"pushed_at":"2021-04-29T19:21:12.000Z","size":19,"stargazers_count":13,"open_issues_count":6,"forks_count":3,"subscribers_count":67,"default_branch":"master","last_synced_at":"2025-03-23T23:27:19.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/envato.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-04T23:32:28.000Z","updated_at":"2022-01-11T00:51:26.000Z","dependencies_parsed_at":"2022-09-17T04:11:27.544Z","dependency_job_id":null,"html_url":"https://github.com/envato/create-react-icon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fcreate-react-icon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fcreate-react-icon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fcreate-react-icon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/envato%2Fcreate-react-icon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/envato","download_url":"https://codeload.github.com/envato/create-react-icon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980833,"owners_count":21027803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T15:25:08.421Z","updated_at":"2025-04-09T04:33:23.472Z","avatar_url":"https://github.com/envato.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# create-react-icon\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Downloads][downloads-image]][downloads-url]\n[![js-standard-style][standard-image]][standard-url]\n\nConvert one or multiple svg files into inline-svg React component, inspired by [react-icons](https://github.com/gorangajic/react-icons) project.\n\nIf you are wondering what the benefit is to use inline svg in React component, please check this post [Creating an SVG Icon System with React](https://css-tricks.com/creating-svg-icon-system-react/).\n\n## Installation\n\n```sh\n$ npm install create-react-icon -g\n```\n\n## Usage\n\n```sh\n$ create-react-icon ./alert.svg dist\n$ create-react-icon ./*.svg dist\n```\n\n## Result\n\nYour source svg file:\n\n```xml\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"\u003e\u003cpath d=\"M200.4 54.1c-1.9-18.7 8.4-32.9 25.8-32.9h63.1c17.4 0 27.7 14.2 25.8 32.9l-27.7 242.2c-1.9 17.4-13.5 28.3-29.6 28.3s-27.7-11-29.6-28.3L200.4 54.1zm57.3 313.1c32.2 0 56 23.8 56 54.8v1.3c0 30.9-23.8 54.8-56 54.8s-56-23.8-56-54.8V422c0-31 23.8-54.8 56-54.8z\"/\u003e\u003c/svg\u003e\n\n```\n\nBecomes to :\n\n```js\nimport React from 'react'\nimport Icon from 'react-icon-base'\n\nexport default (props) =\u003e {\n  return (\n    \u003cIcon viewBox='0 0 512 512' {...props}\u003e\n      \u003ctitle\u003e{props.title || 'alert'}\u003c/title\u003e\n      \u003cg\u003e\u003cpath d=\"M200.4 54.1c-1.9-18.7 8.4-32.9 25.8-32.9h63.1c17.4 0 27.7 14.2 25.8 32.9l-27.7 242.2c-1.9 17.4-13.5 28.3-29.6 28.3s-27.7-11-29.6-28.3L200.4 54.1zm57.3 313.1c32.2 0 56 23.8 56 54.8v1.3c0 30.9-23.8 54.8-56 54.8s-56-23.8-56-54.8V422c0-31 23.8-54.8 56-54.8z\"/\u003e\u003c/g\u003e\n    \u003c/Icon\u003e\n  )\n}\n```\n\n## How to use icons\n\n```js\nimport AlertIcon from 'alertIcon'\n\nexport default (props) =\u003e {\n   return (\u003cdiv\u003e\n     \u003cAlertIcon title='alert icon' /\u003e Manage my Collections\n  \u003c/div\u003e)\n}\n```\n\n## Roadmap\n\n* Make the base component configurable\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/create-react-icon.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/create-react-icon\n[travis-image]: https://img.shields.io/travis/envato/create-react-icon/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/envato/create-react-icon\n[downloads-image]: http://img.shields.io/npm/dm/create-react-icon.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/create-react-icon\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[standard-url]: https://github.com/feross/standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenvato%2Fcreate-react-icon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenvato%2Fcreate-react-icon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenvato%2Fcreate-react-icon/lists"}