SharePoint Online: Switch Navigation to Horizontal or Vertical

Requirement: Enable the top navigation bar in SharePoint Online.

How to add the top navigation bar in SharePoint Online?

SharePoint Online navigation switcher is rolled out finally! A much-awaited feature enables you to change the navigation to either vertical (top navigation) or Horizontal (left navigation). In the past, Only communication sites had Horizontal top navigation, and Team sites were left with quick launch navigation vertically. Now, Microsoft introduced the navigation switcher options for modern team sites that let us change the navigation orientation to Horizontal or vertical (No change in the “Communication” site template, though!). Here are the steps to switch the navigation in SharePoint Online:

  • Login to your SharePoint Online site >> Click on the Settings gear
  • Click on “Change the Look” in the settings menusharepoint online horizontal navigation
  • Click on “Navigation” under “Change the look” pane.sharepoint online vertical navigation
  • Now, you can set the orientation of the navigation to either “Horizontal” or “Vertical”. You can also hide the navigation by turning off the “Site Navigation visibility” switch.sharepoint online switch navigation horizontal vertical
  • Click on the “Save” button to commit your changes.

We also have the ability to set horizontal navigation to “Mega Menu” or “Cascading Menu”.

sharepoint online teamsite mega menu cascading menu

PowerShell to Set Horizontal navigation bar in SharePoint Online

We can move the quick launch from vertical (left navigation) to horizontal (Top navigation) using PowerShell too to add top navigation in SharePoint Online team sites.

#Variables
$SiteURL="https://crescent.sharepoint.com/sites/Retail/US"

Try {
    #Connect to the Sub-Site
    Connect-PnPOnline -Url $SiteURL -Interactive
    
    #Get the subsite
    $Web = Get-PnPWeb
    
    #change the quick launch oritentation
    $Web.HorizontalQuickLaunch = $true
    $Web.Update()
    Invoke-PnPQuery
     
    Write-host "Navigation settings Updated!" -ForegroundColor Green  
}
Catch {
    write-host -f Red "Error Setting Navigation!" $_.Exception.Message
}

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

7 thoughts on “SharePoint Online: Switch Navigation to Horizontal or Vertical

Leave a Reply

Your email address will not be published.