theKashey/react-focus-lock
It is a trap! A lock for a Focus. 🔓 observed · 2026-08-28
Health v2 · maintenance only
66/100
- Activity 97
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3291
- days_rel: n/a
- days_push: 23
- n_releases_24m: 0
Adoption not part of the score
1389 stars · 74 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A React library that traps keyboard focus within a component, such as a modal dialog, preventing users from tabbing out. It supports React portals, focus groups, return-focus behavior, and programmatic focus management.
Use cases
- trap focus inside a modal dialog
- prevent tabbing out of a form
- manage focus for accessibility in React apps
- return focus to the trigger element when a dialog closes
- create multiple isolated focus lock groups
- handle focus for content rendered in React portals
When to choose
- building accessible modal dialogs or popovers in React
- you need focus containment that works with portals and positive tab indexes
- you want a small, battle-tested library trusted by major UI frameworks
When to avoid
- you need combined scroll and focus locking (consider react-focus-on)
- your project is not React-based
- you only need simple focus styling rather than focus containment
Facets
library · maturity stable
ui-components accessibility web-development frontend accessibility browser focus-trap modal-dialogs a11y react-component focus-management react javascript
2 sources
- readme: https://github.com/theKashey/react-focus-lock · fetched 2026-08-28 · c01d8d19a4b7
- registry_npm: https://registry.npmjs.org/react-focus-lock · fetched 2026-08-29 · 509eafeaa788
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| theKashey/react-focus-lock | main | 66 |
For agents
markdown · JSON · MCP: product_card(name="theKashey/react-focus-lock")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem