0.7.0 • Published 26 days ago

keyux v0.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
26 days 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.


Made in Evil Martians, product consulting for developer tools.


Docs

Read full docs here.

0.7.0

26 days ago

0.6.2

28 days ago

0.6.1

28 days ago

0.6.0

1 month ago

0.5.0

1 month ago

0.4.0

2 months ago

0.3.1

2 months ago

0.3.0

2 months ago

0.2.1

2 months ago

0.2.0

2 months ago

0.1.2

2 months ago

0.1.1

2 months ago

0.1.0

2 months ago