Gathering detailed insights and metrics for has-tabbed
Gathering detailed insights and metrics for has-tabbed
Gathering detailed insights and metrics for has-tabbed
Gathering detailed insights and metrics for has-tabbed
npm install has-tabbed
Typescript
Module System
Node Version
NPM Version
HTML (67.51%)
JavaScript (32.49%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
18 Commits
2 Watchers
1 Branches
1 Contributors
Updated on Jun 23, 2022
Latest Version
1.0.4
Package Id
has-tabbed@1.0.4
Unpacked Size
6.39 kB
Size
2.95 kB
File Count
6
NPM Version
9.7.2
Node Version
20.4.0
Published on
Jul 19, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
Today, :focus-visible is widely supported, so you probably want to use that instead of this library. However, I'll keep it around for posterity and poor souls that still have to support old browsers.
Small library that adds CSS class to html when user starts using keyboard to navigate, and removes it if user clicks anywhere.
This enables you to have focus outline only when user is using keyboard.
Get it from npm
npm install --save has-tabbed
and use it
1import HasTabbed from 'has-tabbed'; 2 3const tabbed = new HasTabbed();
That's it. By default library is active when instance is created.
You can control it manually by using addEvents
and removeEvents
methods.
1// Removes all listeners and CSS class 2tabbed.removeEvents(); 3 4// Adds listeners again 5tabbed.addEvents();
Then you can use has-tabbed
class in your CSS
1/* This is naive example used in the demo */ 2* { 3 outline: 3px solid transparent; 4 outline-offset: 0.3rem; 5} 6 7.has-tabbed *:focus { 8 outline: 3px solid #409ad7; 9}
Library accepts a single options object with the following properties:
className (default has-tabbed
)
CSS class name which will be added to the html
element.
triggerOnAllKeys (default false
)
If you want to add CSS class on all keyboard events not only when user presses tab, change this one to true
1import HasTabbed from 'has-tabbed';
2
3const tabbed = new HasTabbed({
4 className: 'navigating-using-keyboard',
5 triggerOnAllKeys: true,
6});
className
property is now replaced with an options object.--tabbed
to has-tabbed
.You should use ES modules, but you can use it directly in the browser.
1<!-- copy "has-tabbed.js" to your project --> 2<script src="has-tabbed.js"></script> 3<script> 4 var tabbed = new HasTabbed(); 5</script>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/13 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More