focus-limit

1.0.3 • Public • Published

Focus Limit

A Javascript library that limits the area the elements can be focused in.

Installation and Usage

Install the library with npm install --save focus-limit or yarn add focus-limit.

Import the library to your project:

import focusLimit from 'focus-limit';

Initialize the limiter on any node:

const formLimiter = focusLimit(document.querySelector('.form'));

// Call method 'limit'

formLimiter.limit();

// Call method 'unlimit' when you don't need limitation

formLimiter.unlimit();

Methods

Method Description
limit() Limits the aria of focus
unlimit() Unlimits the aria of focus

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.30latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i focus-limit

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

94.6 kB

Total Files

7

Last publish

Collaborators

  • miniven