Primitives
Handle focus for a group of elements.
Import the Roving Focus primitives from ng-primitives/roving-focus.
import { NgpRovingFocusGroup, NgpRovingFocusItem } from 'ng-primitives/roving-focus';
Assemble the roving focus directives in your template.
<div ngpRovingFocusGroup>
<button ngpRovingFocusItem>Item 1</button>
<button ngpRovingFocusItem>Item 2</button>
<button ngpRovingFocusItem>Item 3</button>
</div>
The following directives are available to import from the ng-primitives/roving-focus package:
Adheres to the WAI-ARIA Keyboard Interface Practices.
The enabled item that was last focused or clicked is the group's tab stop, whether focus arrived by keyboard, pointer or a focus() call, so arrow keys move on from it and Tab returns to it. Focusing a disabled item, or any item while the group is disabled, leaves the tab stop where it was.
Copyright © 2026 Angular Primitives
This site is powered by Netlify