0.11.1 • Published 3 months ago

keyux v0.11.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

KeyUX

JS library to improve the keyboard UI of web apps. It is designed not only for a11y, but also to create professions tools where users prefer to use the keyboard.

  • Add hotkeys with aria-keyshortcuts.
  • Show a button’s :active state when a hotkey is pressed.
  • Enable navigation with keyboard arrows in role="menu" lists.
  • Jump to the next section according to aria-controls and back with Esc.
  • Show and hide submenus of role="menu".
  • Allow users to override hotkeys.
  • 2 KB (minified and brotlied). No dependencies.
  • Vanilla JS and works with any framework including React, Vue, Svelte.
export const Button = ({ hotkey, children }) => {
  return <button aria-keyshortcuts={hotkey}>
    {children}
    {likelyWithKeyboard(window) && <kbd>{getHotKeyHint(window, hotkey)}</kbd>}
  </button>
}

See demo page and example:

https://github.com/user-attachments/assets/bcd78271-cf76-45a3-8beb-4f3cea69c143



Made at Evil Martians, product consulting for developer tools.


Docs

Read full docs here.

0.11.0

5 months ago

0.11.1

3 months ago

0.10.0

8 months ago

0.9.0

9 months ago

0.8.1

10 months ago

0.8.3

9 months ago

0.8.2

10 months ago

0.7.2

12 months ago

0.8.0

11 months ago

0.7.1

1 year ago

0.7.0

1 year ago

0.6.2

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago