{"id":20085356,"url":"https://github.com/aligilan/loading","last_synced_at":"2026-05-15T07:05:56.763Z","repository":{"id":55194503,"uuid":"313839397","full_name":"aligilan/loading","owner":"aligilan","description":"Very simple and light-weight loading with vanillajs","archived":false,"fork":false,"pushed_at":"2021-01-06T06:23:03.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-13T23:17:24.133Z","etag":null,"topics":["js","loading","loading-spinner","overlay-loading","vanilla-js"],"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/aligilan.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-11-18T06:08:24.000Z","updated_at":"2021-01-06T06:23:06.000Z","dependencies_parsed_at":"2022-08-14T15:41:43.871Z","dependency_job_id":null,"html_url":"https://github.com/aligilan/loading","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/aligilan%2Floading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligilan%2Floading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligilan%2Floading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligilan%2Floading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligilan","download_url":"https://codeload.github.com/aligilan/loading/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241517976,"owners_count":19975345,"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":["js","loading","loading-spinner","overlay-loading","vanilla-js"],"created_at":"2024-11-13T15:55:43.503Z","updated_at":"2026-05-15T07:05:56.703Z","avatar_url":"https://github.com/aligilan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loading\n\nVery simple and light-weight loading with vanilla-js \n\n# Install\n`npm install @aligilan/loading --save`\n\n# How to use\n#### 1- Import style\nAdd `@aligilan/loading/style.css` in header. \u003cbr\u003e\nOr \u003cbr\u003e\nIn your sass file add `@import \"~@aligilan/loading/style.css\";`\n\n---\n\n#### 2- Import js\n\n`let loading = require('@alilan/loading');` \u003cbr\u003e\n`let normal_loading = new loading();` \u003cbr\u003e\n`normal_loading.toggle(target)`\n\n---\n\n##### In Laravel:\nImport:\n\u003epath: resources/app.js\n\u003e`window.Loading = require('@aligilan/loading');` \u003cbr\u003e\n\u003eIn your page script tag:\n\u003e`let normal_loading = new Loading;`\n\nExample: \u003cbr\u003e\n\u003eUse in header tag, when DOM is ready \u003cbr\u003e\n`document.addEventListener(\"DOMContentLoaded\", function(){\n    normal_loading.toggle('#my-element')\n});`\n\nOr\n\n\u003eUse when window loaded: \u003cbr\u003e\n`window.onload = function(){\n    normal_loading.toggle('#my-element')\n}`\n\n---\n\n\u003e `target`  \n\u003eValid target element types are: query-select-string, element-object, element-objects\n\nNow when ever call `normal_loading.toggle(target)`, for first time, that shows loading-spinner (spinner with overlay are inside the target and isn't clickable)\nand at the next call loading-spinner will disappear. \n\nOr `normal_loading.show(target)` then `normal_loading.hide(target)` .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligilan%2Floading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligilan%2Floading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligilan%2Floading/lists"}