{"id":23638206,"url":"https://github.com/byteboomers/vue-autofocus-directive","last_synced_at":"2025-02-27T17:20:40.116Z","repository":{"id":30031592,"uuid":"123734706","full_name":"byteboomers/vue-autofocus-directive","owner":"byteboomers","description":"Vue autofocus directive","archived":false,"fork":false,"pushed_at":"2024-08-30T11:52:47.000Z","size":528,"stargazers_count":34,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-30T09:03:23.360Z","etag":null,"topics":["autofocus","vue","vue-autofocus-directive","vuejs"],"latest_commit_sha":null,"homepage":null,"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/byteboomers.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":"2018-03-03T21:54:58.000Z","updated_at":"2024-08-30T11:52:44.000Z","dependencies_parsed_at":"2024-11-21T03:30:38.761Z","dependency_job_id":null,"html_url":"https://github.com/byteboomers/vue-autofocus-directive","commit_stats":{"total_commits":67,"total_committers":4,"mean_commits":16.75,"dds":0.3880597014925373,"last_synced_commit":"844ec41db0e3bcbbc5c30436cdf582d83a1da552"},"previous_names":["botre/vue-autofocus-directive"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteboomers%2Fvue-autofocus-directive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteboomers%2Fvue-autofocus-directive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteboomers%2Fvue-autofocus-directive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteboomers%2Fvue-autofocus-directive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byteboomers","download_url":"https://codeload.github.com/byteboomers/vue-autofocus-directive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240840106,"owners_count":19866168,"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":["autofocus","vue","vue-autofocus-directive","vuejs"],"created_at":"2024-12-28T07:37:22.198Z","updated_at":"2025-02-27T17:20:40.096Z","avatar_url":"https://github.com/byteboomers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-autofocus-directive\n\nAutofocus directive for Vue\n\n## About\n\nLifted from the official Vue tutorial: https://vuejs.org/v2/guide/custom-directive.html\n\nWhen the page loads, the element with the directive gains focus (note: autofocus doesn’t work on mobile Safari).\n\n## Installation\n\n```bash\nnpm install --save vue-autofocus-directive\n```\n\n[npm package link](https://www.npmjs.com/package/vue-autofocus-directive)\n\n## Usage\n\n```javascript\nimport Vue from \"vue\";\nimport autofocus from \"vue-autofocus-directive\";\nVue.directive(\"autofocus\", autofocus);\n```\n\n```html\n\u003cinput v-autofocus /\u003e\n```\n\n## Options\n\n### `binding`\n\n- Type: `value`\n- Default: `undefined`\n- Description: _Required when using dynamic value_\n\n## Example\n\n```vue\n\u003ctemplate\u003e\n  \u003cform\u003e\n    \u003clabel\u003eEmail\u003c/label\u003e\n    \u003cinput\n      v-autofocus\n      v-model=\"email\"\n      type=\"email\"\n      name=\"email\"\n      placeholder=\"Email\"\n    /\u003e\n  \u003c/form\u003e\n\u003c/template\u003e\n```\n\nor\n\n```vue\n\u003ctemplate\u003e\n  \u003cform\u003e\n    \u003clabel\u003eEmail\u003c/label\u003e\n    \u003cinput\n      v-autofocus=\"dynamicValue\"\n      v-model=\"email\"\n      type=\"email\"\n      name=\"email\"\n      placeholder=\"Email\"\n    /\u003e\n  \u003c/form\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n  data() {\n    return {\n      dynamicValue: false\n    };\n  }\n};\n\u003c/script\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteboomers%2Fvue-autofocus-directive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyteboomers%2Fvue-autofocus-directive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteboomers%2Fvue-autofocus-directive/lists"}