{"id":17125188,"url":"https://github.com/datlyfe/svg-web-component","last_synced_at":"2026-04-11T21:13:00.597Z","repository":{"id":57153706,"uuid":"228204246","full_name":"Datlyfe/svg-web-component","owner":"Datlyfe","description":"A custom web component for rendering svg","archived":false,"fork":false,"pushed_at":"2019-12-15T15:30:17.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T05:37:16.800Z","etag":null,"topics":["javascript","svg","web-components"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Datlyfe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-15T15:13:11.000Z","updated_at":"2021-06-17T13:59:35.000Z","dependencies_parsed_at":"2022-09-07T08:41:38.178Z","dependency_job_id":null,"html_url":"https://github.com/Datlyfe/svg-web-component","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Datlyfe%2Fsvg-web-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Datlyfe%2Fsvg-web-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Datlyfe%2Fsvg-web-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Datlyfe%2Fsvg-web-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Datlyfe","download_url":"https://codeload.github.com/Datlyfe/svg-web-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245204742,"owners_count":20577402,"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":["javascript","svg","web-components"],"created_at":"2024-10-14T18:44:19.152Z","updated_at":"2025-10-18T11:34:20.209Z","avatar_url":"https://github.com/Datlyfe.png","language":"JavaScript","readme":"# svg-web-component\n\nA custom web component for rendering svg icons.\n\n## Instalation\n\n### NPM\n\n```shell\nnpm install svg-web-component\n(or)\nyarn add svg-web-component\n```\n\nAdd your svg data by calling the load function which takes an object where the key is the icon name and the value is the svg source,\n\n```javascript\nimport svgWebComponent from \"svg-web-component\";\nsvgWebComponent.load({\n  plus:\n    '\u003csvg  viewBox=\"0 0 24 24\"\u003e\u003cpath d=\"M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z\"/\u003e\u003c/svg\u003e'\n});\n```\n\n### Browser\n\n```html\n\u003cscript src=\"svg-web-component.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  SvgWebComponent.default.load({\n    plus:\n      '\u003csvg  viewBox=\"0 0 24 24\"\u003e\u003cpath d=\"M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z\"/\u003e\u003c/svg\u003e'\n  });\n\u003c/script\u003e\n```\n\n## Usage\n\n```html\n\u003csvg-icon name=\"plus\"\u003e\u003c/svg-icon\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatlyfe%2Fsvg-web-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatlyfe%2Fsvg-web-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatlyfe%2Fsvg-web-component/lists"}