React hook that returns all tabbable elements within a DOM node
$ npm install use-tabbable-list
import useTabbableList from 'use-tabbable-list'
function Example() {
const ref = useRef(null)
const tabbableList = useTabbableList(ref)
return (
<div ref={ref}>
<input />
<button>Click!</button>
</div>
)
}
A reference to a DOM Node.
An array of all tabbable elements within the ref
node.
MIT