Open source alternatives to focus-trap-react
200 open source apps like focus-trap-react, closest match first.
Top picks
- R

react-toastify
LaunchReact-Toastify is a React library for adding notifications, called toasts, to an app. It is meant for developers who want to show short messages to users without building their own notification system. The README says it is easy to set up,
Open source
- Y

yet-another-react-lightbox
LaunchYet Another React Lightbox is a modern React lightbox component that aims to be performant, easy to use, customizable and extendable. It works with React 19, 18, 17 and 16.8.0 or later, comes with built-in TypeScript types, and is compatibl
Open source
- R

react-swipeable-views
Launchreact-swipeable-views is a React component that makes swipeable views, such as image carousels and tabbed content you can swipe between. The project includes a few packages: the main react-swipeable-views component, react-swipeable-views-ut
Open source
- R

react-joyride
LaunchReact Joyride is an MIT-licensed library for building guided tours and walkthroughs in React apps. You show users around the interface or explain a new feature by setting a list of steps, and the library draws the highlights and tooltips fo
Open source
- K

kbar
Launchkbar is a React component library that adds a command palette, the cmd+k (or ctrl+k) search menu, to a website or web app. Developers wrap their app in a single provider, define actions, and render the provided UI components, or build their
- R

reoverlay
LaunchReoverlay is a small, typed modal manager for React. You mount one ModalContainer near the root of your app, then open, stack and close modals from anywhere with an imperative API. Reoverlay.showModal takes a modal as a configured name, a R
More like focus-trap-react
React Page Visibility
Declarative, nested, stateful, isomorphic page visibility React component

react-complex-tree
Unopinionated Accessible Tree Component with Multi-Select and Drag-And-Drop

sweetalert2-react-content
Official SweetAlert2 enhancer adding support for React elements as content

@egjs/react-infinitegrid
A module used to arrange card elements including content infinitely on a grid
About focus-trap-react

focus-trap-react
A React component that traps focus
focus-trap-react is a React component that traps keyboard focus inside one of its children, which is useful for an accessible modal. It is a thin wrapper around the focus-trap library and adds React-specific handling. The trap activates automatically when the component mounts, unless you change that, and it deactivates when the component unmounts. Props can activate, deactivate, pause and unpause the trap. The component expects exactly one child element, which can be an HTML element or another component that contains focusable elements, and it cannot be a Fragment, because it needs a reference to the underlying DOM element. The README requires React 18.0.0 or later. It notes that the library no longer sets propTypes or defaultProps, since React 19 removed them, and it suggests TypeScript or a runtime validation library instead. Support is aimed at desktop browsers in current versions of Chrome, Edge, Firefox, Safari and Opera, and Internet Explorer is no longer supported. It suits React developers building dialogs, drawers and other overlays that must keep keyboard users inside them.
- Price
- Free
- Made by
- davidtheclark
- Category
- UI Libraries
- Website
- github.com/focus-trap/focus-trap-react




































