You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@chialab/loock

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chialab/loock

Refined keyboard navigation for websites and components.

4.3.0
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

Loock

Refined keyboard navigation for websites and components.

NPM

Introducing Loock

  • Organize your web page or web application by navigation areas.
  • Never lose the context while navigating the area with the TAB key.
  • Leave the context with the ESC key.

Install

NPM

npm install @chialab/loock
yarn add @chialab/loock

CDN

import { focusTrapBehavior } from 'https://unpkg.com/@chialab/loock?module';

Usage

import { focusTrapBehavior } from '@chialab/loock';

const dialog = document.getElementById('.dialog');
const trap = focusTrapBehavior(dialog, {
    inert: true,
});

dialog.addEventListener('open', () => {
    trap.connect();
});

Development

Build status

Build

Install the dependencies and run the build script:

yarn install
yarn build

This will generate the bundles in the dist folder, as well as the declaration file.

Test

Run the test script:

yarn test

License

Loock is released under the MIT license.

FAQs

Package last updated on 21 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts