u1ui / focusgroup.attr

Focus movement by arrow keys

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[u1-focusgroup] - attribute

Focus movement by arrow keys

Features

It allows you to focus elements with arrow keys inside a container.

See also:
https://open-ui.org/components/focusgroup.explainer/
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/Focusgroup/explainer.md

Ussage

<div u1-focusgroup="wrap remember">
    <button>press left</button>
    <button>or right</button>
    <button>to focus the next button</button>
</div>

Install

<script src="https://cdn.jsdelivr.net/gh/u1ui/focusgroup.attr@x.x.x/focusgroup.min.js" type=module></script>

Demos

minimal.html
test.html

About

  • MIT License, Copyright (c) 2022 (like all repositories in this organization)
  • Suggestions, ideas, finding bugs and making pull requests make us very happy.

About

Focus movement by arrow keys


Languages

Language:HTML 70.2%Language:JavaScript 29.8%