Used as part of spatial navigation. Groups together different components to which you can navigate to, in a single navigation group.

Responsible for finding elements in direction on navigation and for tracking active element inside the group. Triggers blur and focus on element when active element is changed, as well as click on element on Action.SELECT. Will call hideUi() on passed in container if Action.BACK is called.

Hierarchy (view full)

Constructors

Properties

container: Container<unknown>
onAction?: ActionCallback

If overwritten, allows to implement custom action behavior. Per default, the internal handler will still be executed. To prevent execution of the default action handler, call preventDefault();

{Action} The action that was called

{HTMLElement} The target element that action was called on

{() => void} A function that, when called, will prevent the execution of the default handler

onNavigation?: NavigationCallback

If overwritten, allows to implement custom navigation behavior. Per default, the internal handler will still be executed. To prevent execution of the default navigation handler, call preventDefault();

{Direction} The direction to move along

{HTMLElement} The target element for the event

{() => void} A function that, when called, will prevent the execution of the default handler

Methods

  • Enable navigation group

    Sets active element to either element that was active before disable, or first element of tracked elements. If it is settings panel, it will always focus first element in the list.

    Returns void