React Focus Trap Component

JSON →
library 12.0.0 ·javascript
verified May 27, 2026

focus-trap-react is a React component that wraps the `focus-trap` library, providing an accessible way to trap focus within a DOM element. This is crucial for UI patterns like modals, dialogs, and overlays, ensuring keyboard users cannot tab outside the active component. The current stable version is 12.0.0. The library maintains a steady release cadence, typically releasing new patch versions to update its underlying `focus-trap` dependency, and major versions coinciding with significant updates to `focus-trap` or React compatibility requirements. Its key differentiator is its direct integration with React's component lifecycle, abstracting the imperative `focus-trap` API into declarative props, simplifying its use in React applications for enhanced accessibility.

total hits 10
actors 5 distinct systems
last hit 4d ago AhrefsBot
GPTBot
2
Script
1
Search engines
1

top countries 🇫🇷 France · 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany