{"repo":"theKashey/react-focus-lock","free":true,"listed":false,"github":"https://github.com/theKashey/react-focus-lock","clone":"git clone https://github.com/theKashey/react-focus-lock.git","description":"It is a trap! A lock for a Focus. 🔓","language":"JavaScript","stars":1388,"topics":["react","a11y","focus","modal-dialogs","focus-lock"],"license":"MIT","category":"ui-components","readme_excerpt":"REACT FOCUS LOCK - browser friendly focus lock - matching all your use cases - trusted by best UI frameworks - the thing Admiral Ackbar was talking about It is a trap! We got your focus and will not let him out! - Modal dialogs. You can not leave it with \"Tab\", ie do a \"tab-out\". - Focused tasks. It will aways brings you back, as you can \"lock\" user inside a component. - Any any other case, when you have to lock user intention and focus , if that's what a11y is asking for. - Including programatic focus management and smart return focus Trusted Trusted by Atlassian AtlasKit, ReachUI, SmoothUI, Storybook and we will do our best to earn your trust too! Features - no keyboard control, everything is done watching a focus behavior , not emulating it. Focus-Locks works for all cases including positive tab indexes. - React Portals support. Even if some data is in outer space - it is still in lock. - Scattered locks, or focus lock groups - you can setup different isolated locks, and tab from one to another. - Controllable isolation level. - variable size bundle. Uses sidecar to trim UI part down to 1.5kb. 💡 focus locks is part of a bigger whole, consider scroll lock and text-to-speech lock you have to use to really \"lock\" the user. Try react-focus-on to archive everything above, assembled in the right order. How to use Just wrap something with focus lock, and focus will be moved inside on mount. Demo - https://codesandbox.io/s/5wmrwlvxv4. API FocusLock would work perfectly even with ","default_branch":null,"files":null,"tree":[],"storefront":"/r/theKashey","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/theKashey/react-focus-lock/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}