focus-trap-improved

1.0.3 • Public • Published

Focus Trap Improved

A simple TypeScript npm package to lock focus within a specified container. This package helps ensure that keyboard navigation stays within a particular section of a webpage, improving accessibility and user experience.

Installation

To install the focus-trap-improved package, use npm:

npm install focus-trap-improved

Usage

Simple import the package:

import FocusTrapImproved from "focus-trap-improved"

Add this line to either an eventlistener or a function

 new FocusLocker();

add the class focus-trap to the element and thats it!

Package Sidebar

Install

npm i focus-trap-improved

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

9.34 kB

Total Files

6

Last publish

Collaborators

  • kingsley_knight