{"id":13601848,"url":"https://github.com/zzarcon/focusable","last_synced_at":"2025-04-04T06:08:26.156Z","repository":{"id":23468156,"uuid":"26832447","full_name":"zzarcon/focusable","owner":"zzarcon","description":":flashlight: Set a spotlight focus on DOM element adding a overlay layer to the rest of the page","archived":false,"fork":false,"pushed_at":"2016-03-03T10:15:53.000Z","size":718,"stargazers_count":1067,"open_issues_count":6,"forks_count":50,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-28T05:11:34.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://zzarcon.github.io/focusable/","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/zzarcon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-18T22:09:40.000Z","updated_at":"2025-02-28T22:39:07.000Z","dependencies_parsed_at":"2022-09-09T13:20:53.408Z","dependency_job_id":null,"html_url":"https://github.com/zzarcon/focusable","commit_stats":null,"previous_names":["zzarcon/focus-element-overlay"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Ffocusable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Ffocusable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Ffocusable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Ffocusable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zzarcon","download_url":"https://codeload.github.com/zzarcon/focusable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128751,"owners_count":20888235,"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":[],"created_at":"2024-08-01T18:01:08.829Z","updated_at":"2025-04-04T06:08:26.138Z","avatar_url":"https://github.com/zzarcon.png","language":"JavaScript","readme":"Focusable [![Build Status](https://travis-ci.org/zzarcon/focusable.svg?branch=master)](https://travis-ci.org/zzarcon/focusable) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)\n=============\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zzarcon/focusable?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\nAn awesome and lightweight library for performing spotlight in your DOM elements, setting an animated overlay to the rest of the page.\nYou can find a [live demo here](http://zzarcon.github.io/focusable/).\n\n### Showcase\n\n![](https://raw.github.com/zzarcon/focus-element-overlay/master/showcase/list.gif)\n\n![](https://raw.github.com/zzarcon/focus-element-overlay/master/showcase/header.gif)\n\n![](https://raw.github.com/zzarcon/focus-element-overlay/master/showcase/elements.gif)\n\n### Installation\n`$ npm i focusable-element --save`\n\n`$ bower i focusable-element`\n\n### API\n###### Set spotlight (jQuery style)\n```javascript\n$('#my-element').setFocus(options);\n```\n###### Set spotlight (through library)\n```javascript\nFocusable.setFocus($('#my-element'), options);\n```\n###### Refresh current focused element\n```javascript\nFocusable.refresh();\n```\n###### Hide spotlight\n```javascript\nFocusable.hide();\n```\n###### Get focused element\n```javascript\nFocusable.getActiveElement();\n```\n###### Get options\n```javascript\nFocusable.getOptions();\n```\n\n###### Options\nProperty | Value | Default | Description\n------------ | ------------- | ------------- | -------------\nfadeDuration | Number | 700 | Duration of the overlay transition (milliseconds).\nhideOnClick | Boolean | false | Hides the overlay when the user click into it.\nhideOnESC | Boolean | false | Hides the overlay when the user press Esc.\nfindOnResize | Boolean | false | Refind the element in the DOM in case that the element don't still exists.\ncircle | Boolean | false | Have the spotlight in a circle shape\n\n###### Runing tests\n* `npm install`\n* `grunt`\n* See the result of testsuite in [http://localhost:9092](http://localhost:9092)\n\n###### Dependencies\n- jQuery\n\n###### Contributing\n\n0. Check [open issues](https://github.com/zzarcon/focusable/issues)\n1. [Fork it](https://github.com/zzarcon/focusable/fork)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n###### Author\nYou can follow me on Twitter - https://twitter.com/zzarcon\n","funding_links":[],"categories":["Web 前端","Javascript","Tours And Guides","JavaScript","UI","Client-side","Tours And Guides [🔝](#readme)","导览与指南"],"sub_categories":["Runner","运行器","运行器e2e测试"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzarcon%2Ffocusable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzzarcon%2Ffocusable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzarcon%2Ffocusable/lists"}