MCPcopy Index your code
hub / github.com/argyleink/roving-ux

github.com/argyleink/roving-ux @v1.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.2 ↗ · + Follow
7 symbols 12 edges 1 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Roving UX

Total Downloads Latest Release License

Turns tedious tab UX into a controlled and stateful experience

Learn more in this article by Rob Dodson on web.dev
Try it at this GUI Challenge (use tab then left || right arrows)

Features & Why

1️⃣ User's shouldn't need to tab through each item in a list to see the next list
2️⃣ Providing keyboard list UX should be easy
3️⃣ Maintaining the last focused element should be easy

Getting Started

Installation

npm i roving-ux

Use the SkyPack CDN https://cdn.skypack.dev/roving-ux
Looking for a React version, here ya go! https://www.npmjs.com/package/roving-ux-react

Importing

// import from CDN
import {rovingIndex} from 'https://cdn.skypack.dev/roving-ux' // cdn es2020

// import from NPM
import {rovingIndex} from 'roving-ux'      // npm es6/common modules
const rovingIndex = require('roving-ux')   // commonjs
Syntax

Quick API Overview

rovingIndex({
  element: node,     // required: the container to get roving index ux
  target: "#foo",    // optional: a query selector for which children should be focusable
})

Example Usage

import {rovingIndex} from 'roving-ux'

// just one roving ux container
// roving-ux will use direct children as focus targets
rovingIndex({
  element: document.querySelector('#carousel')
})
import {rovingIndex} from 'roving-ux'

// many roving ux containers
// passes a custom query selector so the proper elements get focus
document.querySelectorAll('.horizontal-media')
  .forEach(scroller => {
    rovingIndex({
      element: scroller,
      target: 'a',
    })
  })

Core symbols most depended-on inside this repo

activate
called by 3
index.js
focusNextItem
called by 1
index.js
focusPreviousItem
called by 1
index.js
rovingIndex
called by 0
index.js
onFocusin
called by 0
index.js
onKeydown
called by 0
index.js
cleanup
called by 0
index.js

Shape

Function 7

Languages

TypeScript100%

Modules by API surface

index.js7 symbols

For agents

$ claude mcp add roving-ux \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact