◇
RovingFocus
1 partsAnatomy
Import the parts and compose them. Each part forwards attributes to its underlying element.
vue
import {
RovingFocusItem,
} from '@robonen/primitives/utilities/roving-focus';
<RovingFocusItem />API Reference
RovingFocusItem
ItemA single focusable item within a `RovingFocusGroup`. It registers itself with the group's collection, exposes itself as the sole tab stop when current (`tabindex="0"`, others `-1`), and handles the arrow-key navigation that moves focus to its siblings. Use `focusable` to opt an item out of the tab order and `active` to mark the current selection so it gets focus on group entry.
| Prop | Type | Description |
|---|---|---|
tabStopId? | string | Unique tab-stop id. Auto-generated via config useId when omitted. |
focusable? | boolean | Whether this item is focusable. |
active? | boolean | Marks the item as active (current selection). |
allowShiftKey? | boolean | Allow Shift+Arrow for navigation. |