Render a menu differently based on region
You can add template suggestions. Because menus don't know their region, you first have to add a helper variable in block preprocessing:

function YOURTHEME_preprocess_block(array &amp;$variables) {
  if (!empty($variables['elements']['#id'])) {
    $variables['content']['#attributes']['data-block-id'] = $variables['elements']['#id'];
  }
}


After that you can alter the menu template suggestions

function YOURTHEME_theme_suggestions_menu_alter(array &amp;$suggestions, array $variables) {
  if (isset($variables['attributes']['data-block-id'])) {
    $block = \Drupal\block\Entity\Block::load($variables['attributes']['data-block-id']);
    if ($block) {
      array_unshift($suggestions, 'menu__' . str_replace('-', '_', $block-&gt;getRegion()));
    }
  }
}


Now you can use twig templates like menu__REGIONNAME.html.twig for all menus in a given region.