{"id":24120969,"url":"https://github.com/warungpintar/rnsvg-generator","last_synced_at":"2025-09-18T10:32:28.908Z","repository":{"id":48314054,"uuid":"388644261","full_name":"warungpintar/rnsvg-generator","owner":"warungpintar","description":"generate react-native-svg component from .svg file","archived":false,"fork":false,"pushed_at":"2021-08-02T08:29:33.000Z","size":2854,"stargazers_count":34,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-30T02:15:58.110Z","etag":null,"topics":["generator","react-native","react-native-svg","svg"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/warungpintar.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":"2021-07-23T01:27:45.000Z","updated_at":"2023-05-24T15:26:29.000Z","dependencies_parsed_at":"2022-09-21T12:44:10.925Z","dependency_job_id":null,"html_url":"https://github.com/warungpintar/rnsvg-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/warungpintar/rnsvg-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warungpintar%2Frnsvg-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warungpintar%2Frnsvg-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warungpintar%2Frnsvg-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warungpintar%2Frnsvg-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warungpintar","download_url":"https://codeload.github.com/warungpintar/rnsvg-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warungpintar%2Frnsvg-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275751769,"owners_count":25522196,"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","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["generator","react-native","react-native-svg","svg"],"created_at":"2025-01-11T10:49:50.930Z","updated_at":"2025-09-18T10:32:28.392Z","avatar_url":"https://github.com/warungpintar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rnsvg-generator\n\n[![npm version](https://badge.fury.io/js/rnsvg-generator.svg)](https://www.npmjs.com/package/rnsvg-generator)\n[![build](https://github.com/warungpintar/rnsvg-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/warungpintar/rnsvg-generator/actions/workflows/ci.yml)\n\nconvert any svg files into programmable React Component that compatible to `react-native-svg`\n\n## Usage\n\n```bash\nnpx rnsvg-generator source-path-or-folder -o output-path-or-folder\n```\n\nor install it globally\n\n```bash\nnpm i -g rnsvg-generator\n```\n\n## Example\n\nthis svg code\n\n```svg\n\u003csvg height=\"100\" width=\"100\"\u003e\n  \u003ccircle class=\"circle\" cx=\"50\" cy=\"50\" r=\"50\" stroke-width=\"1\" fill=\"#86bc25\" fill-opacity=\"0.4\" /\u003e\n  \u003ccircle class=\"circle\" cx=\"50\" cy=\"50\" r=\"35\" stroke-width=\"1\" fill=\"black\" /\u003e\n  \u003ccircle class=\"circle\" cx=\"50\" cy=\"50\" r=\"34\" stroke-width=\"2\" fill=\"#86bc25\" /\u003e\n\u003c/svg\u003e\n```\n\nwill be converted into\n\n```tsx\nimport React from \"react\";\nimport { Linejoin, Linecap, Svg, Path } from \"react-native-svg\";\n\nexport interface BillProps {\n  outerFill?: string;\n  innerFill?: string;\n  outerStroke?: string;\n  innerStroke?: string;\n  width?: number;\n  height?: number;\n  strokeWidth?: number;\n  strokeLinecap?: Linecap;\n  strokeLinejoin?: Linejoin;\n}\n\nconst Bill: React.FC\u003cBillProps\u003e = (props) =\u003e (\n  \u003cSvg\n    width={props.width ?? 48}\n    height={props.height ?? 48}\n    viewBox=\"0 0 48 48\"\n    fill=\"none\"\n  \u003e\n    \u003cPath\n      d=\"M10 6C10 4.89543 10.8954 4 12 4H36C37.1046 4 38 4.89543 38 6V44L31 39L24 44L17 39L10 44V6Z\"\n      fill={props.outerFill ?? \"#2F88FF\"}\n      stroke={props.outerStroke ?? \"black\"}\n      strokeWidth={props.strokeWidth ?? 4}\n      strokeLinecap={props.strokeLinecap ?? \"round\"}\n      strokeLinejoin={props.strokeLinejoin ?? \"round\"}\n    /\u003e\n    \u003cPath\n      d=\"M18 22L30 22\"\n      stroke={props.innerStroke ?? \"white\"}\n      strokeWidth={props.strokeWidth ?? 4}\n      strokeLinecap={props.strokeLinecap ?? \"round\"}\n      strokeLinejoin={props.strokeLinejoin ?? \"round\"}\n    /\u003e\n    \u003cPath\n      d=\"M18 30L30 30\"\n      stroke={props.innerStroke ?? \"white\"}\n      strokeWidth={props.strokeWidth ?? 4}\n      strokeLinecap={props.strokeLinecap ?? \"round\"}\n      strokeLinejoin={props.strokeLinejoin ?? \"round\"}\n    /\u003e\n    \u003cPath\n      d=\"M18 14L30 14\"\n      stroke={props.innerStroke ?? \"white\"}\n      strokeWidth={props.strokeWidth ?? 4}\n      strokeLinecap={props.strokeLinecap ?? \"round\"}\n      strokeLinejoin={props.strokeLinejoin ?? \"round\"}\n    /\u003e\n  \u003c/Svg\u003e\n);\n\nexport default Bill;\n```\n\n## License\n\nMIT\n\n![Hi-Five](https://media.giphy.com/media/JhThbOq62vwn6/giphy.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarungpintar%2Frnsvg-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarungpintar%2Frnsvg-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarungpintar%2Frnsvg-generator/lists"}