An open API service indexing awesome lists of open source software.

https://github.com/archtechx/alpine-arrow-focus

Focus elements using arrows in Alpine.js
https://github.com/archtechx/alpine-arrow-focus

Last synced: 9 months ago
JSON representation

Focus elements using arrows in Alpine.js

Awesome Lists containing this project

README

          

# Alpine Arrow Focus

An Alpine package for building menu screens that can be navigated using arrows, by replicating the tab focus behavior.

## Usage

```html


First item
Second item
Third item

```

Pressing the up & down keys will now switch between items. When the down key is pressed on the last item, the first item will get selected. When the up key is pressed on the first item, the last key will get selected.

## Installation

### CDN

```html

```

### Node.js

```
import { arrow_focus } from '@leanadmin/alpine-arrow-focus';

// If needed: window.arrow_focus = arrow_focus;
```