Provides a block that renders previous and next links for pages in the current menu trail.

Programmatic Usage

You don't necessarily have to use the block and can call the service directly e.g.

function HOOK_preprocess_page(&$vars) {
    $vars['navigation'] = \Drupal::service('menu_link_navigation.controller')->getNavigation('main');
}

Then in your page template you can render the navigation with {{ navigation }}