{"id":17066779,"url":"https://github.com/tobyzerner/vue-global-attrs","last_synced_at":"2025-10-25T16:11:25.818Z","repository":{"id":57396069,"uuid":"222581457","full_name":"tobyzerner/vue-global-attrs","owner":"tobyzerner","description":"Declaratively apply attributes to the the document element.","archived":false,"fork":false,"pushed_at":"2024-09-27T06:23:10.000Z","size":23,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T08:10:08.654Z","etag":null,"topics":["attributes","javascript","vue"],"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/tobyzerner.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-19T01:31:35.000Z","updated_at":"2021-03-04T06:27:17.000Z","dependencies_parsed_at":"2024-12-06T01:00:10.167Z","dependency_job_id":null,"html_url":"https://github.com/tobyzerner/vue-global-attrs","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"4e212aa118e0b4f1a8dfaa84150646691d2dcb4f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tobyzerner/vue-global-attrs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobyzerner%2Fvue-global-attrs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobyzerner%2Fvue-global-attrs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobyzerner%2Fvue-global-attrs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobyzerner%2Fvue-global-attrs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobyzerner","download_url":"https://codeload.github.com/tobyzerner/vue-global-attrs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobyzerner%2Fvue-global-attrs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263120812,"owners_count":23416887,"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":["attributes","javascript","vue"],"created_at":"2024-10-14T11:08:16.529Z","updated_at":"2025-10-25T16:11:20.780Z","avatar_url":"https://github.com/tobyzerner.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-global-attrs\n\n\u003e Declaratively apply attributes to the the document element.\n\nInspired by [vue-global-events](https://github.com/shentao/vue-global-events).\n\n## Installation\n\n```\nnpm install vue-global-attrs --save\n```\n\n## Usage\n\n```js\nimport GlobalAttrs from 'vue-global-attrs';\n\n// register globally\nVue.component('GlobalAttrs', GlobalAttrs)\n\n// or locally\nexport default {\n  components: { GlobalAttrs },\n  // rest of your component\n}\n```\n\nAfter that you can register global attributes like this:\n\n```html\n\u003cGlobalAttrs\n  v-if=\"attributesConnected\"\n  data-foo=\"bar\"\n  :data-hello=\"'world'\"\n/\u003e\n```\n\nThese attributes are applied (reactively) to the `\u003chtml\u003e` element. The resulting DOM would look like this:\n\n```html\n\u003chtml data-foo=\"bar\" data-hello=\"world\"\u003e\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobyzerner%2Fvue-global-attrs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobyzerner%2Fvue-global-attrs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobyzerner%2Fvue-global-attrs/lists"}