Skip to content
focus-trap-react

Free alternatives to focus-trap-react

200 free apps like focus-trap-react, closest match first.

Top picks

  1. R

    react-aria-modal

    Launch

    react-aria-modal is a React modal component built to follow the WAI-ARIA Authoring Practices. It provides a minimally styled container that wraps your own presentational component, so you control the content and the look. Out of the box, it

  2. R

    react-modal

    Launch

    react-modal is an accessible modal dialog component for React, maintained in the reactjs organization on GitHub. It renders a dialog above the page so you can show your own content in a popup. You can install it from npm or yarn. For a Reac

  3. R

    react-hotkeys

    Launch

    React HotKeys is a React library for declaring keyboard shortcuts and managing focus areas in a React app. You describe your shortcuts as a key map, attach handlers to them with JSX components or a higher-order component, and the library de

  4. R

    react-keyboard

    Launch

    react-keyboard is a React wrapper around mousetrap.js that handles keyboard shortcuts in a React application. The README describes it as a declarative library for hotkeys and focus. You define a keyMap, an object whose values are key sequen

  5. R

    @rc-component/portal

    Launch

    @rc-component/portal is a React portal primitive that renders content outside the normal component tree, into a container of your choosing, with careful handling of the container through the component's lifecycle. It is part of the Ant Desi

  6. R

    react-bootstrap-modal

    Launch

    react-bootstrap-modal is a React port of the Bootstrap modal, partly based on jschr's better Bootstrap modals. It reimplements the Twitter Bootstrap modal component in a way that fits React, and it builds on the original work of the react-b

More like focus-trap-react

7
R

react-modal-image

Lightweight Lightbox React Component

Launch
8
R

react-tabs

React tabs component

Launch
9
R

react-aria-menubutton

A fully accessible and flexible React-powered menu button

Launch
10
R

rc-drawer

drawer component for react

Launch
11
R

react-portal

To make your life with React Portals easier

Launch
12
R

react-command-palette

WAI-ARIA compliant React command palette like the one in Atom

Launch
13
R

react-toastify

React notification made easy

Launch
14
R

react-contexify

Add contextmenu to your react component with ease

Launch
15
R

react-switch

Draggable toggle-switch component for react

Launch
16
R

react-native-use-modal-hooks

React hooks for displaying a modal window in React Native

Launch
17
R

react-skylight

A react component for modals and dialogs

Launch
18
Y

yet-another-react-lightbox

Modern React lightbox component

Launch
19
R

react-joyride

Create walkthroughs and guided tours for your ReactJS apps

Launch
20
R

react-on-screen

A wrapper component to track if your react component is visible on screen

Launch
21
R

react-scroll

React scroll component

Launch
22
K

kbar

fast, portable, and extensible cmd+k interface for your site

Launch
23
R

rc-rate

React Star Rate Component

Launch
24
R

react-bottom-fixed

A React component for iOS

Launch
25
R

reoverlay

The missing solution for managing modals in React

Launch
26
R

@rc-component/trigger

Popup trigger and alignment primitive for React

Launch
27
R

react-autosuggest

WAI-ARIA compliant React autosuggest component

Launch
28
R

react-range

Range input. Slides in all directions

Launch
29
R

react-overlays

Utilities for creating robust overlay components

Launch
30
R

react-collapsible

React component to wrap content in Collapsible element

Launch
31
R

react-accessible-treeview

A react component that implements the treeview pattern as described

Launch
32
R

react-keydown

Lightweight keydown wrapper for React components

Launch
33
R

react-toggle

An elegant, accessible toggle component for React. Also a glorified checkbox

Launch
34
R

react-draggable

React draggable component

Launch
35
R

@restart/ui

Utilities for creating robust overlay components

Launch
36
R

react-popup

React popup component from Minutemailer

Launch
37
R

react-joyride

Create guided tours for your apps

Launch
38
R

react-pro-sidebar

high level and customizable side navigation

Launch
39
R

react-native-hole-view

Component to made an overlay with touch-through hole

Launch
40
R

react-text-truncate

Truncate text for React.js

Launch
41
R

react-custom-scrollbars

React scrollbars component

Launch
42
F

@faceless-ui/modal

America's next top modal

Launch
43
R

React Page Visibility

Declarative, nested, stateful, isomorphic page visibility React component

Launch
44
T

@TanStack/hotkeys

Type-Safe keyboard shortcuts library with awesome devtools

Launch
45
R

react-dropdown

A lightweight, accessible dropdown component for React

Launch
46
R

react-simple-tree-menu

A simple React tree menu component

Launch
47
R

react-copy-to-clipboard

Copy-to-clipboard React component

Launch
48
R

rodal

A React modal with animations

Launch
49
R

react-widgets

An à la carte set of polished, extensible, and accessible inputs built for React

Launch
50
R

react-simple-image-viewer

Simple image viewer component for React

Launch

About focus-trap-react

F

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