@chialab/loock v4.2.0
Loock
Refined keyboard navigation for websites and components.
Introducing Loock
- Organize your web page or web application by navigation areas.
- Never lose the context while navigating the area with the
TABkey. - Leave the context with the
ESCkey.
Install
NPM
npm install @chialab/loockyarn add @chialab/loockCDN
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
Install the dependencies and run the build script:
yarn installyarn buildThis will generate the bundles in the dist folder, as well as the declaration file.
Test
Run the test script:
yarn testLicense
Loock is released under the MIT license.
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago