Skip to content
JS
Package

focus-trap-react

A React component that traps focus.

v12.0.3, 22 Jun 2026MITCommonJSTypes: BundledAccessibilityReact
$ npm install focus-trap-react

Key numbers

As of 25 Sept 2026
Weekly downloads
916.8k
+30% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
2
Direct, from package.json
Last release
3 months ago
v12.0.3
GitHub stars
784
66 forks
Open issues / PRs
2 / 3
Contributors
-
Commits, last 52 weeks
301

Downloads

Last week 2026-09-15 to 2026-09-21
0500k1m1.5mSept 2025Mar 2026Sept 2026High 1.5m (25 Aug 2026)Low 474.4k (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

916,837 downloads last week, 4,934,252 in the last month. The 12-month change of +30% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
679 in total
Latest version
12.0.3, 22 Jun 20263 months ago
First published
17 Aug 2015
Last push to GitHub
23 Sept 20261 day before the snapshot
Repository archived
No
Open issues
2
Open pull requests
3
Commits, last 52 weeks
301
Dependents on npm
577

Major versions

  1. v12 first release 12.0.0, 29 Jan 2026
  2. v11 first release 11.0.0, 7 Dec 2024
  3. v10 first release 10.0.0, 24 Aug 2022
  4. v9 first release 9.0.0, 10 Jun 2022
  5. v8 first release 8.0.0, 4 Sept 2020
  6. v7 first release 7.0.0, 1 Jul 2020
  7. v6 first release 6.0.0, 26 Jan 2019
  8. v5 first release 5.0.0, 2 Dec 2018
  9. v4 first release 4.0.0, 1 Aug 2018
  10. v3 first release 3.0.0, 18 Jun 2016
  11. v2 first release 2.0.0, 18 Oct 2015
  12. v1 first release 1.0.0, 27 Aug 2015
  13. v0 first release 0.1.0, 17 Aug 2015

Recent releases

VersionPublished
12.0.322 Jun 2026
12.0.216 May 2026
12.0.125 Apr 2026
12.0.029 Jan 2026
11.0.611 Jan 2026
11.0.57 Jan 2026
11.0.428 May 2025
11.0.313 Jan 2025
11.0.231 Dec 2024
11.0.112 Dec 2024
11.0.07 Dec 2024
10.3.110 Nov 2024
10.3.021 Sept 2024
10.2.312 Oct 2023
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
93 kB
Dependencies (2)
tabbablefocus-trap
Peer dependencies (4)
reactreact-dom@types/react@types/react-dom
npm install focus-trap-react
  • jsDelivrhttps://cdn.jsdelivr.net/npm/focus-trap-react@12.0.3/
  • unpkghttps://unpkg.com/focus-trap-react@12.0.3/
  • esm.shhttps://esm.sh/focus-trap-react@12.0.3
PackageWeekly downloadsGzipLast releaseModuleComparison
react-aria-menubutton78.9k-8 months agoESM + CommonJS-
focus-layers12.5k-5 years agoESM + CommonJS-
@faceless-ui/modal543.5k-2 months agoESM only-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.