Keyboard shortcuts interface for your website. Working with static HTML, Vanilla JS, Vue, React, Svelte.
Ninja Keys is a keyboard shortcut interface for websites that works with Vanilla JS, Vue, and React. It allows users to quickly navigate and perform actions on websites using keyboard shortcuts. The library is lightweight and customizable, making it suitable for various types of websites.
To install Ninja Keys, you can choose one of the following methods:
If you are using a build system like webpack, rollup, or vite, you can install Ninja Keys from NPM using the following command:
npm install ninja-keys
If you are using HTML/JS without a build system, you can include Ninja Keys directly from a CDN like so:
<script src="https://cdn.jsdelivr.net/npm/ninja-keys@1.0.0/dist/ninja-keys.min.js"></script>
After installing Ninja Keys, you can add the <ninja-keys>
tag to your HTML. You can use a flat data structure or a tree structure to define your shortcuts. The library provides various attributes that you can use to customize its behavior, such as placeholder
, disableHotkeys
, hideBreadcrumbs
, openHotkey
, navigationUpHotkey
, navigationDownHotkey
, and closeHotkey
.
Ninja Keys is a versatile keyboard shortcut interface for websites, compatible with Vanilla JS, Vue, and React. It offers features like keyboard navigation, light and dark themes, icon support, nested menus, root search, customization options, and customizable hotkeys. With Ninja Keys, users can become keyboard ninjas and quickly navigate and perform actions on websites with ease.