{"id":20013459,"url":"https://github.com/indigomultimediateam/svgicon","last_synced_at":"2026-04-29T13:31:43.706Z","repository":{"id":54765082,"uuid":"288695529","full_name":"IndigoMultimediaTeam/SVGIcon","owner":"IndigoMultimediaTeam","description":"Web component handling Icon System with SVG Sprites","archived":false,"fork":false,"pushed_at":"2021-05-20T14:38:33.000Z","size":93,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T15:11:31.013Z","etag":null,"topics":["svg","svg-icon","svg-sprites","web-component","webcomponent","webcomponents"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/IndigoMultimediaTeam.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":"2020-08-19T09:55:50.000Z","updated_at":"2023-10-17T08:20:41.000Z","dependencies_parsed_at":"2022-08-14T02:10:27.208Z","dependency_job_id":null,"html_url":"https://github.com/IndigoMultimediaTeam/SVGIcon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndigoMultimediaTeam%2FSVGIcon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndigoMultimediaTeam%2FSVGIcon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndigoMultimediaTeam%2FSVGIcon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndigoMultimediaTeam%2FSVGIcon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IndigoMultimediaTeam","download_url":"https://codeload.github.com/IndigoMultimediaTeam/SVGIcon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241448346,"owners_count":19964457,"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":["svg","svg-icon","svg-sprites","web-component","webcomponent","webcomponents"],"created_at":"2024-11-13T07:36:41.328Z","updated_at":"2026-04-29T13:31:38.683Z","avatar_url":"https://github.com/IndigoMultimediaTeam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SVGIcon\nWeb component handling Icon System with SVG Sprites\n\n## Overview\nThis library provides simple way using icons in svg sprites, just write\n```HTML\n\u003csvg-icon use=\"path/file.svg#icon_name\"\u003e\u003c/svg-icon\u003e\n```\ninto your HTTML file and or\n```HTML\n\u003cscript\u003eSVGIcon.setAlias(\"icon\", \"path/file.svg#\")\u003c/script\u003e\n\u003csvg-icon use=\"icon-icon_name\"\u003e\u003c/svg-icon\u003e\n```\nObviously the [Custom Elements (V1)](https://caniuse.com/#feat=custom-elementsv1) are in game, so you can safely use only in latest version of Firefox/Chrome/Chromium/Edge.\n\n## Usages\n- SVG sprites file can looks like: `\u003csvg\u003e…\u003cdefs\u003e\u003csvg id=\"icon_name\" …\u003c/svg\u003e…\u003c/defs\u003e\u003c/svg\u003e` (e.g. [icons.svg](./docs/examples_files/icons.svg?short_path=2105ba1)).\n- Library and config scripts should be ideally placed before icons will be used (convenient place is `\u003chead\u003e`). There are several types of library in [*bin/*](./bin/) folder.\n- Web component is now fully functional\n\n## Default behaviour\n- Library expose default styling via css var `var(--svg-icon-size, 1em)` and `svg-icon` is block element with size of `--svg-icon-size`\n- In fact library uses `\u003csvg…\u003cuse xlink:href=\"…\"\u003c/use\u003e\u003c/svg\u003e`, so you can follow [Icon System with SVG Sprites | CSS-Tricks](https://css-tricks.com/svg-sprites-use-better-icon-fonts/). **But, instead of `\u003cg\u003e` use `\u003csvg\u003e`** (for more freedom – using `viewBox`)\n\n## More info\n- See [changeOptions(def)](./docs/SVGIcon-namespace.md#changeOptions), [setAlias(alias, target)](./docs/SVGIcon-namespace.md#setAlias) and [removeAlias(alias)](./docs/SVGIcon-namespace.md#removeAlias)\n- Or [full documentation](./docs/SVGIcon-namespace.md)\n- See [examples](https://indigomultimediateam.github.io/SVGIcon/examples.html)\n\n## Study resourses\n- [Icon Fonts vs. SVGs: An Ultimate Guide to Accessible Web Icons - DEV](https://dev.to/linuxfuture/icon-fonts-vs-svgs-an-ultimate-guide-to-accessible-web-icons-2lh6)\n- [SVG Fragment Identifier Linking](http://www.broken-links.com/tests/svg/fragment-identifiers.php)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findigomultimediateam%2Fsvgicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findigomultimediateam%2Fsvgicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findigomultimediateam%2Fsvgicon/lists"}