{"id":32251083,"url":"https://github.com/anacierdem/svg-wrapper","last_synced_at":"2026-02-19T08:38:45.131Z","repository":{"id":58227277,"uuid":"114407260","full_name":"anacierdem/svg-wrapper","owner":"anacierdem","description":"A polymer web component to wrap SVGs","archived":false,"fork":false,"pushed_at":"2018-03-15T13:33:16.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-23T19:56:52.256Z","etag":null,"topics":["draw","optimization","performance","polymer-element","polymer2","reflow","render","style","svg","webcomponents"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/anacierdem.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":"2017-12-15T20:07:00.000Z","updated_at":"2024-12-08T05:33:58.000Z","dependencies_parsed_at":"2022-08-31T06:51:21.986Z","dependency_job_id":null,"html_url":"https://github.com/anacierdem/svg-wrapper","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/anacierdem/svg-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacierdem%2Fsvg-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacierdem%2Fsvg-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacierdem%2Fsvg-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacierdem%2Fsvg-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anacierdem","download_url":"https://codeload.github.com/anacierdem/svg-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacierdem%2Fsvg-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29608657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["draw","optimization","performance","polymer-element","polymer2","reflow","render","style","svg","webcomponents"],"created_at":"2025-10-22T18:03:26.512Z","updated_at":"2026-02-19T08:38:45.112Z","avatar_url":"https://github.com/anacierdem.png","language":"HTML","funding_links":["http://patreon.com/anacierdem"],"categories":[],"sub_categories":[],"readme":"# svg-wrapper element\n\nYou can wrap your SVGs if it contains style tags just by replacing them with svg-style.\nAlternatively provide the svg-data property as a string with actual SVG data. You can also\nbind to this property but the textContent inside the element is not bindable.\n\nSetting `pre-render` property will draw the SVG onto a canvas to prevent any further SVG draw operations to improve performance.\n\nIf you provide a unique reference property, consequent wrappers with same reference will display the same image with same size, without re-drawing anything.\n\nWhen using `pre-render`;\n\nThe element will trigger `renderCompleted` when the SVG is successfully drawn.\nThe element will trigger `renderStart` when the SVG has started drawing.\n\nThese two events are expected to trigger with equal amounts if no errors occur, so you can keep track of waiting and rendered SVGs.\n\n## Installation\n\nbower install svg-wrapper\n\n## Usage\n\n    \u003csvg-wrapper\n        pre-render=\"true\"\u003e\n        \u003csvg width=\"100%\"\u003e\u003cdefs\u003e\u003csvg-style\u003e[These will not affect current scope's style]\u003c/svg-style\u003e ... \u003c/svg\u003e\n    \u003c/svg-wrapper\u003e\n\n    \u003csvg-wrapper\n        pre-render=\"true\"\n        svg-data='\u003csvg width=\"100%\"\u003e\u003cdefs\u003e\u003cstyle\u003e[You can use regular style tag with svg-data]\u003c/style\u003e ... \u003c/svg\u003e'\u003e\n    \u003c/svg-wrapper\u003e\n\n    \u003csvg-wrapper\n        pre-render=\"true\"\n        reference=\"myUniqueId\"\n        svg-data='\u003csvg width=\"100%\"\u003e\u003cdefs\u003e\u003cstyle\u003e[You can use regular style tag with svg-data]\u003c/style\u003e ... \u003c/svg\u003e'\u003e\n    \u003c/svg-wrapper\u003e\n\n    \u003c!-- This won't need data, will display the above image --\u003e\n    \u003csvg-wrapper\n        reference=\"myUniqueId\"\n    \u003c/svg-wrapper\u003e\n\n    \u003csvg-wrapper\n        svg-data='\u003csvg width=\"100%\"\u003e\u003cdefs\u003e\u003csvg-style\u003e[These will not affect current scope's style]\u003c/svg-style\u003e ... \u003c/svg\u003e'\u003e\n    \u003c/svg-wrapper\u003e\n\n    \u003csvg-wrapper\u003e\n        \u003csvg width=\"100%\"\u003e\u003cdefs\u003e\u003csvg-style\u003e[These will not affect current scope's style]\u003c/svg-style\u003e ... \u003c/svg\u003e\n    \u003c/svg-wrapper\u003e\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n### Trying out the element\n\nFirst, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve this element locally.\n\n## Credits\n\nAli Naci Erdem\nhttps://alinacierdem.com\nSupport me at http://patreon.com/anacierdem","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanacierdem%2Fsvg-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanacierdem%2Fsvg-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanacierdem%2Fsvg-wrapper/lists"}