{"id":19904352,"url":"https://github.com/alloc/react-native-svgkit","last_synced_at":"2025-05-03T00:31:36.822Z","repository":{"id":57096722,"uuid":"174633593","full_name":"alloc/react-native-svgkit","owner":"alloc","description":"SVG support for react-native-macos","archived":true,"fork":false,"pushed_at":"2023-10-21T03:18:08.000Z","size":446,"stargazers_count":10,"open_issues_count":6,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-20T23:02:47.882Z","etag":null,"topics":["react-native","react-native-macos","svgkit"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/alloc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-09T01:21:55.000Z","updated_at":"2024-11-11T16:56:53.000Z","dependencies_parsed_at":"2024-11-12T20:40:54.954Z","dependency_job_id":null,"html_url":"https://github.com/alloc/react-native-svgkit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Freact-native-svgkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Freact-native-svgkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Freact-native-svgkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Freact-native-svgkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alloc","download_url":"https://codeload.github.com/alloc/react-native-svgkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252126559,"owners_count":21698964,"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":["react-native","react-native-macos","svgkit"],"created_at":"2024-11-12T20:28:01.529Z","updated_at":"2025-05-03T00:31:35.941Z","avatar_url":"https://github.com/alloc.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @alloc/react-native-svgkit\n\nSVG support for [react-native-macos](https://github.com/ptmt/react-native-macos)\n\nTypeScript definitions included!\n\n\u0026nbsp;\n\n## Install\n\n```sh\nnpm install @alloc/react-native-svgkit\n```\n\n1. Add `macos/RNSVGKit.xcodeproj` to your project\n\n2. Add these frameworks to your project:\n  - libxml2.tbd\n  - AppKit.framework\n  - QuartzCore.framework\n  - CoreGraphics.framework\n\n\u0026nbsp;\n\n## Usage\n\n```ts\nimport {SVGKView} from '@alloc/react-native-svgkit'\n\n// Control the width without needing to know the aspect ratio.\n\u003cSVGKView style={{width: 50}} data=\"...\" /\u003e\n\n// Explicit size is optional.\n\u003cSVGKView source={require('./foo.svg')} /\u003e\n```\n\nAny `\u003cView\u003e` prop can be passed to `\u003cSVGKView\u003e`.\n\nWhen neither `props.style.width` nor `props.style.height` is defined, the `\u003cSVGKView\u003e` fills its parent (while preserving its aspect ratio).\n\n### props.data\n\nThe string of SVG markup. This always overrides the `source` prop.\n\nLoading of the `source` prop is cancelled when the `data` prop is set.\n\n### props.source\n\nThe reference to an SVG, either local or remote.\n\nFor local SVGs: `require('./foo.svg')`\n\nFor remote SVGs: `{ uri: 'https://foo.com/bar.svg' }`\n\nLoading is cancelled whenever the `source` prop changes.\n\nThe previous image is cleared immediately whenever the `data` or `source` props change.\n\n### props.tintColor\n\nOverride the `fillColor` and/or `strokeColor` of every shape in the SVG.\n\n### props.anchorPoint\n\nAfter the SVG is resized to fit its view, it gets aligned based on the difference between its view size and image size.\n\nDefaults to `{x: 0.5, y: 0.5}` (center alignment)\n\n### props.onLoadStart\n\nCalled when the `source` prop begins loading.\n\n### props.onError\n\nCalled when either (1) the `source` prop failed to load, or (2) the SVG markup has a syntax error.\n\nSyntax errors in the `data` prop are included.\n\nPassed an object like `{ nativeEvent: { error: string } }`\n\n### props.onLoad\n\nCalled once the `source` prop has been loaded and rendered without error.\n\n### props.onLoadEnd\n\nCalled when the `source` prop either (1) fails to load or (2) is rendered.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Freact-native-svgkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falloc%2Freact-native-svgkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Freact-native-svgkit/lists"}