@empathyco/x-components
Version:
Empathy X Components
27 lines (15 loc) • 953 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DirectionalFocusNavigationService](./x-components.directionalfocusnavigationservice.md) > [navigateTo](./x-components.directionalfocusnavigationservice.navigateto.md)
## DirectionalFocusNavigationService.navigateTo() method
Get the element that would be the next one to be navigated to based on the direction of the arrow key pressed. If there are no possible candidates the element to focus would be the one on currently on focus or the first one in the container.
**Signature:**
```typescript
navigateTo(arrowKey: ArrowKey): HTMLElement;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| arrowKey | [ArrowKey](./x-components.arrowkey.md) | The arrow key that was pressed. |
**Returns:**
HTMLElement
The element to navigate to.