{"id":1761,"url":"https://github.com/exyte/SVGView","last_synced_at":"2025-08-06T14:31:42.281Z","repository":{"id":37006924,"uuid":"334681837","full_name":"exyte/SVGView","owner":"exyte","description":"SVG parser and renderer written in SwiftUI","archived":false,"fork":false,"pushed_at":"2024-07-10T06:32:59.000Z","size":1928,"stargazers_count":666,"open_issues_count":32,"forks_count":80,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-12-06T07:04:00.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","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/exyte.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}},"created_at":"2021-01-31T14:59:53.000Z","updated_at":"2024-12-05T09:02:13.000Z","dependencies_parsed_at":"2024-01-29T17:08:33.287Z","dependency_job_id":null,"html_url":"https://github.com/exyte/SVGView","commit_stats":{"total_commits":72,"total_committers":10,"mean_commits":7.2,"dds":0.5972222222222222,"last_synced_commit":"b2f2b2a7b576604ad17c11b3af33c27992bc5bcf"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exyte%2FSVGView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exyte%2FSVGView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exyte%2FSVGView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exyte%2FSVGView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exyte","download_url":"https://codeload.github.com/exyte/SVGView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905555,"owners_count":17989783,"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-01-05T20:15:55.171Z","updated_at":"2025-08-06T14:31:42.240Z","avatar_url":"https://github.com/exyte.png","language":"Swift","funding_links":[],"categories":["Parsing","Libs","SVG","Swift"],"sub_categories":["Other Parsing","SVG","Content"],"readme":"\u003ca href=\"https://exyte.com/\"\u003e\u003cpicture\u003e\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/exyte/media/master/common/header-dark.png\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/exyte/media/master/common/header-light.png\"\u003e\u003c/picture\u003e\u003c/a\u003e\n\n\u003ca href=\"https://exyte.com/\"\u003e\u003cpicture\u003e\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/exyte/media/master/common/our-site-dark.png\" width=\"80\" height=\"16\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/exyte/media/master/common/our-site-light.png\" width=\"80\" height=\"16\"\u003e\u003c/picture\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"https://twitter.com/exyteHQ\"\u003e\u003cpicture\u003e\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/exyte/media/master/common/twitter-dark.png\" width=\"74\" height=\"16\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/exyte/media/master/common/twitter-light.png\" width=\"74\" height=\"16\"\u003e\n\u003c/picture\u003e\u003c/a\u003e \u003ca href=\"https://exyte.com/contacts\"\u003e\u003cpicture\u003e\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/exyte/media/master/common/get-in-touch-dark.png\" width=\"128\" height=\"24\" align=\"right\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/exyte/media/master/common/get-in-touch-light.png\" width=\"128\" height=\"24\" align=\"right\"\u003e\u003c/picture\u003e\u003c/a\u003e\n\n\u003cp\u003e\u003ch1 align=\"left\"\u003eSVGView\u003c/h1\u003e\u003c/p\u003e\n\n\u003cp\u003e\u003ch4\u003eSVG parser written in SwiftUI\u003c/h4\u003e\u003c/p\u003e\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fexyte%2FSVGView%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/exyte/SVGView)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fexyte%2FSVGView%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/exyte/SVGView)\n[![SPM Compatible](https://img.shields.io/badge/SwiftPM-Compatible-brightgreen.svg)](https://swiftpackageindex.com/exyte/SVGView)\n[![Cocoapods Compatible](https://img.shields.io/badge/cocoapods-Compatible-brightgreen.svg)](https://cocoapods.org/pods/SVGView)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License: MIT](https://img.shields.io/badge/License-MIT-black.svg)](https://opensource.org/licenses/MIT)\n\n# Overview\n\nThe goal of this project is to bring the full power of SVG to Apple platforms. Our framework can parse SVG files and represent their content in SwiftUI. It provides you with the ability to not only render SVG files, but also add interactivity to them, handle user input and use SwiftUI to put your art into motion.\n\n# Usage\n\nGet started with `SVGView` in a few lines of code:\n\n```Swift\nstruct ContentView: View {\n    var body: some View {\n        SVGView(contentsOf: Bundle.main.url(forResource: \"example\", withExtension: \"svg\")!)\n    }\n}\n```\n\n## Customization\n\nYou can change various parameters for the nodes like this:\n\n```Swift\nlet circle = SVGCircle(cx: 30, cy: 30, r: 30)\ncircle.fill = SVGColor.black\ncircle.stroke = SVGStroke(fill: SVGColor(hex: \"ABCDEF\"), width: 2)\ncircle.onTapGesture {\n    print(\"tap\")\n}\n```\n\n## Interact with vector elements\n\nYou may locate the desired part of your SVG file using standard identifiers to add gestures and change its properties in runtime:\n\n```Swift\nstruct ContentView: View {\n    var body: some View {\n        let view = SVGView(contentsOf: Bundle.main.url(forResource: \"example\", withExtension: \"svg\")!)\n        if let part = view.getNode(byId: \"part\") {\n            part.onTapGesture {\n                part.opacity = 0.2\n            }\n        }\n        return view\n    }\n}\n```\n\n## Animation\n\nYou can use standard SwiftUI tools to animate your image:\n\n```Swift\nif let part = view.getNode(byId: \"part\") {\n    part.onTapGesture {\n        withAnimation {\n            part.opacity = 0.2\n        }\n    }\n}\n```\n\n## Complex effects\n\nSVGView makes it easy to add custom effects to your app. For example, make this \u003ca href=\"https://www.iconfinder.com/icons/1337497/\"\u003epikachu\u003c/a\u003e track finger movement:\n\n```Swift\nvar body: some View {\n    let view = SVGView(contentsOf: Bundle.main.url(forResource: \"pikachu\", withExtension: \"svg\")!)\n    let delta = CGAffineTransform(translationX: getEyeX(), y: 0)\n    view.getNode(byId: \"eye1\")?.transform = delta\n    view.getNode(byId: \"eye2\")?.transform = delta\n\n    return view.gesture(DragGesture().onChanged { g in\n        self.x = g.location.x\n    })\n}\n```\n\n\u003cimg src=\"https://i.imgur.com/Ij0Xn4A.gif\" width=\"300\" height=\"300\"\u003e\n\n# SVG Tests Coverage\n\nOur mission is to provide 100% support of all SVG standards: 1.1 (Second Edition), Tiny 1.2 and 2.0. However, this project is at its very beginning, so you can follow our progress on \u003ca href=\"w3c-coverage.md\"\u003ethis page\u003c/a\u003e. You can also check out \u003ca href=\"https://github.com/exyte/SVGViewTests\"\u003eSVGViewTests project\u003c/a\u003e to see how well this framework handles every single SVG test case.\n\n# Installation\n\n## Swift Package Manager\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/exyte/SVGView.git\")\n]\n```\n\n## CocoaPods\n\n```ruby\npod 'SVGView'\n```\n\n## Carthage\n\n```ogdl\ngithub \"Exyte/SVGView\"\n```\n\n# Requirements\n\n* iOS 14+ / watchOS 7+ / macOS 11+\n* Xcode 12+\n\n## Our other open source SwiftUI libraries\n[PopupView](https://github.com/exyte/PopupView) - Toasts and popups library    \n[AnchoredPopup](https://github.com/exyte/AnchoredPopup) - Anchored Popup grows \"out\" of a trigger view (similar to Hero animation)    \n[Grid](https://github.com/exyte/Grid) - The most powerful Grid container    \n[ScalingHeaderScrollView](https://github.com/exyte/ScalingHeaderScrollView) - A scroll view with a sticky header which shrinks as you scroll    \n[AnimatedTabBar](https://github.com/exyte/AnimatedTabBar) - A tabbar with a number of preset animations   \n[MediaPicker](https://github.com/exyte/mediapicker) - Customizable media picker     \n[Chat](https://github.com/exyte/chat) - Chat UI framework with fully customizable message cells, input view, and a built-in media picker  \n[OpenAI](https://github.com/exyte/OpenAI) Wrapper lib for [OpenAI REST API](https://platform.openai.com/docs/api-reference/introduction)    \n[AnimatedGradient](https://github.com/exyte/AnimatedGradient) - Animated linear gradient     \n[ConcentricOnboarding](https://github.com/exyte/ConcentricOnboarding) - Animated onboarding flow    \n[FloatingButton](https://github.com/exyte/FloatingButton) - Floating button menu    \n[ActivityIndicatorView](https://github.com/exyte/ActivityIndicatorView) - A number of animated loading indicators    \n[ProgressIndicatorView](https://github.com/exyte/ProgressIndicatorView) - A number of animated progress indicators    \n[FlagAndCountryCode](https://github.com/exyte/FlagAndCountryCode) - Phone codes and flags for every country    \n[LiquidSwipe](https://github.com/exyte/LiquidSwipe) - Liquid navigation animation    \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexyte%2FSVGView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexyte%2FSVGView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexyte%2FSVGView/lists"}