{"id":28339358,"url":"https://github.com/iceywu/svg-animate-web","last_synced_at":"2026-01-27T06:01:40.804Z","repository":{"id":225292766,"uuid":"765569724","full_name":"IceyWu/svg-animate-web","owner":"IceyWu","description":"svg-animate-web","archived":false,"fork":false,"pushed_at":"2025-05-10T04:23:50.000Z","size":211,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T14:44:36.611Z","etag":null,"topics":["animation","svg","typescript","web"],"latest_commit_sha":null,"homepage":"https://svg-animate-web.netlify.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IceyWu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-03-01T07:20:15.000Z","updated_at":"2025-05-10T04:23:54.000Z","dependencies_parsed_at":"2025-06-20T09:36:17.957Z","dependency_job_id":"5be63d9d-ba51-4b12-9878-89fd36cb8a35","html_url":"https://github.com/IceyWu/svg-animate-web","commit_stats":null,"previous_names":["iceywu/svg-animate-web"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/IceyWu/svg-animate-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceyWu%2Fsvg-animate-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceyWu%2Fsvg-animate-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceyWu%2Fsvg-animate-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceyWu%2Fsvg-animate-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IceyWu","download_url":"https://codeload.github.com/IceyWu/svg-animate-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceyWu%2Fsvg-animate-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28805328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T05:43:52.625Z","status":"ssl_error","status_checked_at":"2026-01-27T05:43:48.957Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["animation","svg","typescript","web"],"created_at":"2025-05-27T01:24:23.450Z","updated_at":"2026-01-27T06:01:40.798Z","avatar_url":"https://github.com/IceyWu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eSVG-Animate-Web\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nMaking your svg moving🦄.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/svg-animate-web\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/svg-animate-web?color=14C9C9\u0026label=\" alt=\"NPM version\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n## 动机\n\n周末闲暇时，我在做个人网站时遇到一个有趣的需求：想让 SVG 图标有个描边动画效果。市面上有很多成熟的动画库，但大多功能繁杂、体积庞大。其实我只需要一个轻量的 SVG 动画解决方案，于是决定自己动手写一个。\n\n这就是`svg-animate-web`的由来 —— 一个完全为个人兴趣开发的小工具，纯粹是解决自己的需求，顺便分享给有类似需求的同学。\n\n## 📦 Installation\n\n```bash\nnpm install svg-animate-web\nor\npnpm add svg-animate-web\nor\nyarn add svg-animate-web\n```\n\n## 🦄 Usage\n[Demo](https://svg-animate-web.netlify.app/)\n\n\n### Vue\n\n```html\n\u003c!-- temp.vue --\u003e\n\u003ctemplate\u003e\n  \u003csvg\n    class=\"w-80 h-80\"\n    ref=\"svgRef\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    id=\"canvas\"\n    viewBox=\"543.535 363.549 714.421 294.549\"\n  \u003e\n    \u003cpath\n      d=\"M 5561 ....... 422.32\"\n      style=\"stroke: black; fill: black\"\n      stroke-width=\"5.5\"\n    /\u003e\n    \u003cpath\n      d=\"M 5561 ....... 422.32\"\n      style=\"stroke: black; fill: black\"\n      stroke-width=\"5.5\"\n    /\u003e\n    ....\n  \u003c/svg\u003e\n\u003c/template\u003e\n```\n\n```ts\n// main.ts\nimport SetSvgAnimation from 'svg-animate-web'\nconst svgRef = ref\u003cHTMLElement\u003e()\nonMounted(() =\u003e {\n  SetSvgAnimation(svgRef.value)\n\n  // Or use with options\n  // SetSvgAnimation(svgRef.value, {\n  // duration: 5,\n  //   fill: \"transparent\",\n  //   fillBase: \"#333\",\n  //   stroke: \"#333\",\n  //   strokeWidth: 10,\n  //   count:1\n  // })\n})\n```\n\n## 🐟 Source\n\n[Demo Source](./play/src/App.vue)\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./docs/use.gif\" style=\"width:100%;\"  /\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficeywu%2Fsvg-animate-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficeywu%2Fsvg-animate-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficeywu%2Fsvg-animate-web/lists"}