GitXplorerGitXplorer
W

tab-guard

public
6 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
b925da0d15d0c918af246bd045560da22e11ff78

fix build command

WWickyNilliams committed 8 months ago
Unverified
175e43b28356f45a9e371976b18de3b02d581a0c

0.1.0

WWickyNilliams committed 8 months ago
Unverified
80013f5694f8bd8e7c22e72b5040e243004cc9c7

rename to tab-guard :(

WWickyNilliams committed 8 months ago
Unverified
20acfb7e560c1f9d4cd3d8dedb63e0a926f8a858

ready for publish

WWickyNilliams committed 8 months ago
Unverified
3137193f70881b5756a9fc729c4beac693bf765d

update readme

WWickyNilliams committed 8 months ago
Unverified
8c85b630763b7ad0f60b4a40788da493056a469e

tweak glob for tests

WWickyNilliams committed 8 months ago

README

The README file for this repository.

<tab-guard>

Tab guard is a custom element/web component that traps tab presses.

  • Small - 0.8KB min/brotli
  • Simple - practically no API
  • Efficient - minimal DOM traversal

Installation

npm install tab-guard

Usage

Via module

import "tab-guard";

Via CDN

<script type="module" src="https://unpkg.com/tab-guard"></script>

Using the component

<tab-guard>
  <button>Button 1</button>
  <button>Button 2</button>
  <button>Button 3</button>
</tab-guard>
<button>Button 4</button>

Traps can be disabled:

<tab-guard>
  <button>Button 1</button>
  <button>Button 2</button>
  <tab-guard disabled>
    <button>Button 3</button>
    <button>Button 4</button>
  </tab-guard>
</tab-guard>

Traps can be nested:

<tab-guard>
  <button>Button 1</button>
  <button>Button 2</button>
  <tab-guard>
    <button>Button 3</button>
    <button>Button 4</button>
  </tab-guard>
</tab-guard>

Docs

For full documentation, visit: https://wicky.nillia.ms/tab-guard/

License

MIT