0.1.6 • Published 8 months ago

@rescui/focus-manager v0.1.6

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
8 months ago

Tiny helper, which adds data-focus-method attribute to focused elements.

Possible values:

  • mouse
  • key
  • touch

Usage

JS:

import FocusManager from '@rescui/focus-manager'

document.addEventListener('DOMContentLoaded', () => {
  new FocusManager();
});

CSS:

/* Your custom focus styles */
:focus { 
    outline: 2px solid #087CFA;
}

/* Disable focus outline for touch and mouse interactions */
:focus[data-focus-method="mouse"], 
:focus[data-focus-method="touch"] {
    outline: none;
}
0.1.6

8 months ago

0.1.5

9 months ago

0.1.4

11 months ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago