0.1.2 • Published 3 years ago

use-roving-tabindex v0.1.2

Weekly downloads
6
License
MIT
Repository
-
Last release
3 years ago

use-roving-tabindex

Roving tabindex as a tiny (601B) react hook

Examples

codesandbox

Installation

npm install use-roving-tabindex

Usage

import { useRovingTabindex } from "use-roving-tabindex";
function BasicExample() {
  const [compositeRef] = useRovingTabindex();

  return (
    <div ref={compositeRef}>
      <button>item 0</button>
      <button>item 1</button>
      <button>item 2</button>
    </div>
  );
}