0.5.4 • Published 7 months ago
makeup-keyboard-trap v0.5.4
makeup-keyboard-trap
This module restricts keyboard tabindex to a single subtree in the DOM. This behaviour is useful when implementing a modal interface (e.g. a modal dialog).
It will ignore programmatically focusable items with a tabindex of -1
.
Experimental
This module is still in an experimental state, until it reaches v1 you must consider all minor releases as breaking changes.
import * as keyboardTrap from "makeup-keyboard-trap";
// trap an element
keyboardTrap.trap(document.querySelector("el"));
// untrap the current trapped element
keyboardTrap.untrap();
Install
// via npm
npm install makeup-keyboard-trap
// via yarn
yarn add makeup-keyboard-trap
Events
- keyboardTrap : fired by trapped element when keyboard trap is activated
- keyboardUntrap : fired by trapped element when keyboard trap is deactivated
0.5.4
7 months ago
0.5.3
9 months ago
0.5.2
10 months ago
0.5.1
11 months ago
0.5.0
1 year ago
0.4.2
1 year ago
0.4.1
3 years ago
0.4.0
3 years ago
0.3.0
4 years ago
0.2.6
5 years ago
0.2.5
5 years ago
0.2.4
5 years ago
0.2.3
5 years ago
0.2.1
5 years ago
0.2.2
5 years ago
0.2.0
6 years ago
0.1.1
7 years ago
0.1.0
7 years ago
0.0.9
7 years ago
0.0.8
8 years ago
0.0.7
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago