{"id":27890350,"url":"https://github.com/craftzing/craftzing-icons-setup-example","last_synced_at":"2025-05-05T10:47:02.540Z","repository":{"id":279372321,"uuid":"845623903","full_name":"craftzing/craftzing-icons-setup-example","owner":"craftzing","description":"Base repo on how to setup icons correctly","archived":false,"fork":false,"pushed_at":"2025-02-25T15:09:08.000Z","size":277,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-25T15:32:58.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/craftzing.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T15:51:36.000Z","updated_at":"2025-02-25T15:09:12.000Z","dependencies_parsed_at":"2025-02-25T15:33:42.218Z","dependency_job_id":null,"html_url":"https://github.com/craftzing/craftzing-icons-setup-example","commit_stats":null,"previous_names":["craftzing/icons-setup-example","craftzing/craftzing-icons-setup-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftzing%2Fcraftzing-icons-setup-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftzing%2Fcraftzing-icons-setup-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftzing%2Fcraftzing-icons-setup-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftzing%2Fcraftzing-icons-setup-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craftzing","download_url":"https://codeload.github.com/craftzing/craftzing-icons-setup-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252485869,"owners_count":21755823,"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":"2025-05-05T10:47:02.108Z","updated_at":"2025-05-05T10:47:02.534Z","avatar_url":"https://github.com/craftzing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# icons setup example\n\nThis is an example setup copy pasted from the [itsme® public website](https://www.itsme-id.com/) for inspiration purposes.\n\nThis setup uses [SVGO](https://github.com/svg/svgo) and converts everything to two things:\n- SVG sprite file that only exists of small UI icons which are used in most of the UI in the website;\n- SVG DuoColor icons (read: astethic illustrative icons) which are loaded separatly;\n\nAll of these icons are loaded onto the pages with [SVG `use` trick](https://css-tricks.com/svg-use-with-external-reference-take-2/).\n\nWe attached 2 components in this repo of which you can see how it actually works as a React component.\n\nThis technique has a lot of benefits:\n- 🏎️ It's a great performance bump, adding all icons inline in React is frowned upon as it will be part of the virtual dom.\n- 💽 Caching purposes, if you load it once on the client you can cache it forever!\n- 💅🏻 Modifiable and flexibility, by using the `use` trick you can still change all icon colors.\n\nRead more into performance impact for React here:\nhttps://kurtextrem.de/posts/svg-in-js\n\n## run local demo\nTo run the local demo, you need to the following:\n\n1. run `npm run icons` to build icon sprite and all other icons\n2. run `npx http-server -o public` (or another simple plug and play node server library)\n3. open `http://127.0.0.1:8080/`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftzing%2Fcraftzing-icons-setup-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraftzing%2Fcraftzing-icons-setup-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftzing%2Fcraftzing-icons-setup-example/lists"}