{"id":13602284,"url":"https://github.com/actuallyakash/spacers","last_synced_at":"2025-04-06T23:18:06.963Z","repository":{"id":57366841,"uuid":"352250381","full_name":"actuallyakash/spacers","owner":"actuallyakash","description":"🔳 when you need more __space__. Quick margin/padding for your no-code tools.","archived":false,"fork":false,"pushed_at":"2023-03-23T18:14:49.000Z","size":4858,"stargazers_count":275,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T19:08:51.953Z","etag":null,"topics":["builder-plugin","javascript","javascript-library","library","margin","no-code","no-code-ui","padding","spacers","spacing","vanilla-js"],"latest_commit_sha":null,"homepage":"http://actuallyakash.github.io/spacers","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/actuallyakash.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-28T05:40:13.000Z","updated_at":"2025-03-06T13:32:54.000Z","dependencies_parsed_at":"2024-01-16T22:20:16.629Z","dependency_job_id":"80402afd-ae16-497e-b670-5dfb8c52b953","html_url":"https://github.com/actuallyakash/spacers","commit_stats":{"total_commits":54,"total_committers":1,"mean_commits":54.0,"dds":0.0,"last_synced_commit":"160c1a691eda6513453a43cd0df0340c6a18fd86"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actuallyakash%2Fspacers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actuallyakash%2Fspacers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actuallyakash%2Fspacers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actuallyakash%2Fspacers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actuallyakash","download_url":"https://codeload.github.com/actuallyakash/spacers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247563942,"owners_count":20958971,"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":["builder-plugin","javascript","javascript-library","library","margin","no-code","no-code-ui","padding","spacers","spacing","vanilla-js"],"created_at":"2024-08-01T18:01:18.976Z","updated_at":"2025-04-06T23:18:06.937Z","avatar_url":"https://github.com/actuallyakash.png","language":"JavaScript","readme":"spacers\n-------\n\n[1]: \u003chttps://github.com/actuallyakash/spacers\u003e\n\n_when you need more space_\n\n\u003cimg src=\"https://res.cloudinary.com/dmz9bftyk/image/upload/v1625301678/spacers_giwb8b.gif\"\u003e\n\n#### Demo\n\n[http://actuallyakash.github.io/spacers](http://actuallyakash.github.io/spacers/)\n\n#### Package Managers\n\n```sh\n# Bower\nbower install --save spacersjs\n\n# NPM\nnpm install spacersjs\n```\n\n#### CDNs\n\n```html\n# unpkg\n\u003clink rel=\"stylesheet\" href=\"https://unpkg.com/spacersjs/spacers/spacers.min.css\" /\u003e\n\u003cscript src=\"https://unpkg.com/spacersjs/spacers/spacers.min.js\"\u003e\u003c/script\u003e\n\n# jsDelivr\n\u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/spacersjs/spacers/spacers.min.css\" /\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/spacersjs/spacers/spacers.min.js\"\u003e\u003c/script\u003e\n\n# CDNjs\n\u003clink rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/spacersjs/1.0.6/spacers.min.css\" /\u003e\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/spacersjs/1.0.6/spacers.min.js\"\u003e\u003c/script\u003e\n\n```\n\n#### Bookmarklet\nTry spacers quickly on any webpage through the bookmarklet.\n\n```javascript\njavascript: (() =\u003e {var spacerScript=document.createElement(\"script\");spacerScript.type=\"text/javascript\",spacerScript.src=\"https://cdn.jsdelivr.net/npm/spacersjs/spacers/spacers.min.js\",document.getElementsByTagName(\"head\")[0].appendChild(spacerScript);var spacersStyles=document.createElement(\"link\");spacersStyles.rel=\"stylesheet\",spacersStyles.type=\"text/css\",spacersStyles.href=\"https://cdn.jsdelivr.net/npm/spacersjs/spacers/spacers.min.css\",document.head.appendChild(spacersStyles),spacerScript.onload=function(){spacers({element:\"*\",showOnHover:!0,enableLock:!0,onDragEnd:function(e){console.log(e)}}),alert(\"Spacers active!\")};})();\n```\n\n\u003e \u003csmall\u003e\u003cb\u003eNote:\u003c/b\u003e May not work on some websites due to Content Security Policy.\u003c/small\u003e\n\n### Settings\n\n**Option**|**Type**|**Default**|**Description**\n-----|-----|-----|-----\nelement|string|null|Selector on which the spacer has to be initialized\nappendHtml|string|begin|To append spacer divs after or before the specified `element`. Use `begin` to append before the selector and `end` to append after the selector.\npadding|boolean|true|To enable padding, which is default behavior\nmargin|boolean|false|To enable margin\nonDragEnd|function|null|Function for using the spacer values when drag is ended\ncontainedArea|object (DOM node or jQuery object) or window.document|Use if you're not able to find the element (ex- when using iframe)\nspacerClass|string|null|For adding custom classes in the spacers\ndefaultSpacing|string|8|Initial starting spacer height.\ndefaultPadding|object|null|an object with initial padding spacer top, bottom, left, right values. Overwrites the `defaultSpacing` parameter\ndefaultMargin|object|null|an object with initial margin spacer top, bottom, left, right values. Overwrites the `defaultSpacing` parameter\nspacingUnit|string|px|Change default spacing unit of spacers like em, rem, in, cm ..etc\nshowOnHover|boolean|false|Show spacers only on hover\nhideSpacingValue|boolean|false|Hides the margin/padding values at the center of the spacer\nshowLabel|string|null|Enable and set the label to specified string beside the spacing value\nenableLock|boolean|false|Link opposite spacers\nlockIcon|string|```\u003cspan class=\"lock\"\u003e\u003c/span\u003e```|HTML string for the lock icon\nunlockIcon|string|```\u003cspan class=\"unlock\"\u003e\u003c/span\u003e```|HTML string for the unlock icon\n\n#### Example\n\nInitialize with:\n\n```javascript\nspacers({\n    element: '.element-unique-class'\n});\n ```\n\n#### Dependencies\n\nVoila! It works without any dependencies.\n\n#### License\n\nCopyright (c) 2021 Akash\nLicensed under the MIT license.\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factuallyakash%2Fspacers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factuallyakash%2Fspacers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factuallyakash%2Fspacers/lists"}