Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neosiae/use-tabbable-list
React hook that returns all tabbable elements within a DOM node
https://github.com/neosiae/use-tabbable-list
Last synced: 24 days ago
JSON representation
React hook that returns all tabbable elements within a DOM node
- Host: GitHub
- URL: https://github.com/neosiae/use-tabbable-list
- Owner: neosiae
- License: mit
- Created: 2019-05-18T18:50:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:48:14.000Z (almost 2 years ago)
- Last Synced: 2023-08-24T08:17:35.368Z (about 1 year ago)
- Language: JavaScript
- Size: 3.07 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# use-tabbable-list
![npm](https://img.shields.io/npm/v/use-tabbable-list.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/neosiae/use-tabbable-list/master.svg?style=flat-square)](https://travis-ci.com/neosiae/use-tabbable-list) ![npm](https://img.shields.io/npm/dw/use-tabbable-list.svg?style=flat-square) ![npm bundle size (version)](https://img.shields.io/bundlephobia/min/use-tabbable-list/1.0.0.svg?style=flat-square) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
React hook that returns all tabbable elements within a DOM node
## Installation
> \$ npm install use-tabbable-list
## Usage
```javascript
import useTabbableList from 'use-tabbable-list'function Example() {
const ref = useRef(null)const tabbableList = useTabbableList(ref)
return (
Click!
)
}
```## API
### `useTabbableList(ref)`
#### ref
A reference to a DOM Node.
#### Return value
An array of all tabbable elements within the `ref` node.
## License
MIT