{"id":18937803,"url":"https://github.com/oakstudios/inline-svg","last_synced_at":"2025-04-15T18:32:32.771Z","repository":{"id":183444821,"uuid":"618150013","full_name":"oakstudios/inline-svg","owner":"oakstudios","description":"A web component for dynamically fetching SVG files and inlining them in HTML","archived":false,"fork":false,"pushed_at":"2024-04-06T00:09:59.000Z","size":101,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T01:05:35.821Z","etag":null,"topics":[],"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/oakstudios.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":"2023-03-23T21:20:16.000Z","updated_at":"2023-09-01T15:44:34.000Z","dependencies_parsed_at":"2023-07-24T14:18:59.844Z","dependency_job_id":"dc4539f4-4374-460c-8952-a8c5956a6be1","html_url":"https://github.com/oakstudios/inline-svg","commit_stats":null,"previous_names":["oakstudios/inline-svg"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakstudios%2Finline-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakstudios%2Finline-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakstudios%2Finline-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakstudios%2Finline-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oakstudios","download_url":"https://codeload.github.com/oakstudios/inline-svg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830421,"owners_count":21168272,"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":"2024-11-08T12:12:31.586Z","updated_at":"2025-04-15T18:32:29.755Z","avatar_url":"https://github.com/oakstudios.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inline SVG\n\n\u003c!-- **[Demo](https://oakstudios.github.io/inline-svg)** --\u003e\n\n## Installation\n\n```\nnpm i @oakstudios/inline-svg\n```\n\n### Web Component\n\n1. Load the web component. Choose the option that best suits your needs:\n    \n    Using a `script` tag placed at the end of the `body`:\n    \n    ```html\n    \u003c!-- this automatically registers the component in the window as mechanical-ragger --\u003e\n    \u003cscript type=\"module\" src=\"https://unpkg.com/@oakstudios/inline-svg@latest/auto-register.js\"\u003e\u003c/script\u003e\n    ```\n    \n    _OR_ importing the same auto-register function in JS:\n    \n    ```js\n    import \"@oakstudios/inline-svg/auto-register\";\n    ```\n    \n    _OR_ registering the component manually:\n    \n    ```js\n    import InlineSVG from \"@oakstudios/inline-svg\";\n    \n    customElements.define(\"inline-svg\", InlineSVG);\n    ```\n\n2. Then add it to your HTML:\n\n   ```html\n   \u003cinline-svg src=\"/path/to/file.svg\"\u003e\u003c/inline-svg\u003e\n   ```\n\n## API\n| Attribute | Default | Description |\n| - | - | - |\n| `src` | `null` | HTTP path or URL to the desired SVG image |\n| `scoped` | `false` | Scopes `id` attributes and references to them within the SVG. Helps prevent naming collisions within the HTML document. |\n\n## Acknowledgements\nhttps://www.npmjs.com/package/react-inlinesvg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foakstudios%2Finline-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foakstudios%2Finline-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foakstudios%2Finline-svg/lists"}