{"id":18865808,"url":"https://github.com/proustibat/svg-loader-es6","last_synced_at":"2025-04-14T14:24:05.654Z","repository":{"id":65503666,"uuid":"116712199","full_name":"proustibat/svg-loader-es6","owner":"proustibat","description":"SVG Loader Vanilla ES6 - A npm lib to create a customizable SVG loader with Vanilla ES6","archived":false,"fork":false,"pushed_at":"2025-02-24T20:35:42.000Z","size":1031,"stargazers_count":5,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T03:24:09.615Z","etag":null,"topics":["es6","es6-classes","es6-javascript","loader","npm","npm-package","svg","svg-animated-icons","svg-animations","svg-loader","vanilla-es6","vanilla-javascript","vanilla-js"],"latest_commit_sha":null,"homepage":"https://svg-loader-doc.proustibat.dev/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proustibat.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":"2018-01-08T18:21:57.000Z","updated_at":"2024-11-27T14:17:27.000Z","dependencies_parsed_at":"2023-01-26T12:46:59.353Z","dependency_job_id":null,"html_url":"https://github.com/proustibat/svg-loader-es6","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proustibat%2Fsvg-loader-es6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proustibat%2Fsvg-loader-es6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proustibat%2Fsvg-loader-es6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proustibat%2Fsvg-loader-es6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proustibat","download_url":"https://codeload.github.com/proustibat/svg-loader-es6/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248895400,"owners_count":21179232,"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":["es6","es6-classes","es6-javascript","loader","npm","npm-package","svg","svg-animated-icons","svg-animations","svg-loader","vanilla-es6","vanilla-javascript","vanilla-js"],"created_at":"2024-11-08T05:04:39.639Z","updated_at":"2025-04-14T14:24:05.642Z","avatar_url":"https://github.com/proustibat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SVG Loader ES6 \u003ca href='https://github.com/proustibat/svg-loader-es6/blob/master/LICENSE.md'\u003e\u003cimg src='https://img.shields.io/github/license/proustibat/svg-loader-es6.svg' alt='GitHub license'/\u003e\u003c/a\u003e\n\n## A class to create customizable SVG loader with Vanilla ES6.\n\n| [![GitHub package version](https://img.shields.io/github/package-json/v/proustibat/svg-loader-es6.svg)]() \u003cbr/\u003e [![npm](https://img.shields.io/npm/v/svg-loader-es6.svg)](https://www.npmjs.com/package/svg-loader-es6) \u003cbr/\u003e  [![Npm downloads](https://img.shields.io/npm/dt/svg-loader-es6.svg)](https://www.npmjs.com/package/svg-loader-es6) | [![Maintenance](https://img.shields.io/maintenance/yes/2024.svg)](https://github.com/proustibat/svg-loader-es6/commits/main) \u003c/br\u003e [![GitHub last commit](https://img.shields.io/github/last-commit/proustibat/svg-loader-es6.svg)](https://github.com/proustibat/svg-loader-es6/commits/main) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=proustibat_svg-loader-es6\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=proustibat_svg-loader-es6)\u003cbr/\u003e[![SonarQube Cloud](https://sonarcloud.io/images/project_badges/sonarcloud-light.svg)](https://sonarcloud.io/summary/new_code?id=proustibat_svg-loader-es6) |\n|-|-|-|\n\n\n\n---------------------\n\n## Installation\n```sh\n# Yarn\nyarn add --exact svg-loader-es6\n\n# NPM\nnpm install --save --save-exact svg-loader-es6\n\n```\n\n## Usage\n\nSomewhere in your document:\n\n```html\n\u003cdiv id=\"your-container-id\" /\u003e\n```\nThen in your javascript :\n- Import:\n```js\nimport { SVGLoader } from 'svg-loader-es6';\n```\n- Instantiate:\n```js\nnew SVGLoader( {\n  containerId: 'your-container-id'\n} )\n```\n\n## Settings\nThe constructor can accept more keys in the object as parameters.\n\nOption | Type | Default | Description\n------ | ---- | ------- | -----------\ncontainerId | String | \"loader-container\" | **Required** - The id of the element that will contain the SVG element\nsvgId | String | \"loader\" | The id given to the created SVG element\nnbRects | int   | 3 | Number of rectangle shapes in the SVG\nmargin | int   | 2 | Margin between the shapes (in px)\nfill | String (Hex, RGB, RGBA)   | \"#000000\" | Color of the shapes in the SVG\nsize | int   | 15 | Height and width of each shape (rectangle) of the SVG (in px)\nradius | int   | 2 | Value of the border radius of each rectangle shape of the SVG (in px)\nminOpacity | Number   | 0.25 | Opacity to give to each shapes at the begin of the animation\nmaxOpacity | Number   | 0.75 | Opacity to give to each shapes at the end of the animation\nduration | int   | 1000 | Duration of the animation of each shape from minOpacity to maxOpacity (in ms)\n\n\n## Properties of an instance\n\nProperty | Type  | Description\n-------- | ----  | -----------\nsettings | Object | The current options of the SVGLoader instance (read-only)\ndefaultOptions | Object | The default options for settings if there's no settings given to the constructor. This is a static method, so call it as follows: `SVGLoader.defaultProperties`\n\n\n## Methods \n\nProperty | Parameters | Default | Description\n-------- | ---------- | ------- | -----------\ntoggle | - | - | Hide or show the SVG Element\nshow | - | - | Show the SVG Element\nhide | - | - | Hide the SVG Element\ndestroy | - | - | Remove the SVG element from DOM and delete all properties or listeners\n\n\n## Demo\n### [A complete demo is available here](https://proustibat.github.io/svg-loader-es6-example/)\n\u003cimg src=\"https://j.gifs.com/zK9948.gif\" alt=\"Live Demo Examples\" width=\"500\" /\u003e\n\n#### [The source code of the demo is here](https://github.com/proustibat/svg-loader-es6-example)\n\n### [Use the settings generator here](https://proustibat.github.io/svg-loader-es6-example/generator.html)\n\u003cimg src=\"https://j.gifs.com/qYDD8r.gif\" alt=\"Settings generator gif\" width=\"500\" /\u003e\n\n## Contributing\n\n| Issue Tracker: \u003ca href=\"https://github.com/proustibat/svg-loader-es6/issues\" alt=\"\"\u003ehttps://github.com/proustibat/svg-loader-es6/issues\u003c/a\u003e\u003cbr/\u003eSource Code: \u003ca href=\"https://github.com/proustibat/svg-loader-es6\"\u003ehttps://github.com/proustibat/svg-loader-es6\u003c/a\u003e\u003cbr/\u003ePull Requests: \u003ca href=\"https://github.com/proustibat/svg-loader-es6/pulls\" alt=\"\"\u003ehttps://github.com/proustibat/svg-loader-es6/pulls\u003c/a\u003e | \u003ca href=\"https://github.com/standard/standard\"\u003e\u003cimg src=\"https://cdn.rawgit.com/standard/standard/master/badge.svg\" alt=\"JavaScript Style Guide\" /\u003e\u003c/a\u003e |\n| - | - |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproustibat%2Fsvg-loader-es6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproustibat%2Fsvg-loader-es6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproustibat%2Fsvg-loader-es6/lists"}