Others

How to Hide the Left Sidebar on a Single Modern SharePoint Page

Emma BrownEmma Brown Nov 3, 2026 868 views

Question details

The user wants to remove or hide the left-hand navigation pane (Quick Launch) on a specific modern SharePoint page without affecting the navigation across the entire site.

How to Hide the Left Sidebar on One Modern SharePoint Page
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Customizing the layout of a single modern SharePoint page to maximize screen space by removing the left navigation sidebar.
Observed behavior
Modern SharePoint does not offer built-in settings to hide the Quick Launch navigation on a per-page basis, and modifying the layout with custom CSS is officially unsupported.
Before you start

Check with your SharePoint administrator to ensure you have the necessary permissions to deploy custom SharePoint Framework (SPFx) web parts, as out-of-the-box settings only allow hiding the navigation for the entire site.

Solution 1Recommended

Use a Custom SPFx Web Part (Modern Script Editor)

Since custom CSS is unsupported natively, deploying a third-party SPFx web part like the Modern Script Editor allows you to inject CSS into a specific page.

Modern SharePoint pages do not natively support adding code snippet web parts like the classic Script Editor. However, open-source developers have created a modern equivalent using the SharePoint Framework (SPFx).

Note that Microsoft does not officially support custom CSS injection, and future layout updates by Microsoft may break your custom code on production sites.

1
Download the SPFx package

Download a modern SPFx Script Editor web part package from a reputable GitHub repository (such as the PnP SPFx web parts collection).

2
Deploy to the App Catalog

Upload and deploy the app package (.sppkg) to your organization's SharePoint App Catalog. This step requires SharePoint Administrator privileges.

3
Edit your target page

Navigate to the specific modern page where you want to hide the sidebar and click 'Edit' in the top right corner of the screen.

4
Insert the web part and CSS

Add the newly deployed Modern Script Editor web part to the page and insert the necessary CSS code to target and hide the left navigation DOM element.

Use a Custom SPFx Web Part (Modern Script Editor)
Maintainability Warning: Relying on custom CSS in modern SharePoint is risky because Microsoft frequently updates the underlying page DOM structure. Your custom CSS may stop working without notice.
Free Microsoft Office alternative

Enhance Your Daily Productivity with WPS Office

While SharePoint handles your team's intranet and web pages, you still need a robust desktop suite for creating documents, spreadsheets, and presentations. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office, perfectly matching your document management needs.

  1. 1. Download and install: Get the official WPS Office installer from the website and complete the quick installation process.
  2. 2. Set as default: Easily set WPS Office as your default application to handle all your standard document formats.
  3. 3. Work seamlessly: Open, edit, and save your existing Microsoft Office files without worrying about formatting issues.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Lightweight installation with blazing-fast launch speeds to save system resources.Familiar, easy-to-use tabbed user interface that requires zero learning curve.Built-in advanced PDF editing tools available entirely for free.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the classic Script Editor web part work on modern SharePoint pages?

Microsoft redesigned modern pages for responsiveness and security. Native script injection was disabled to prevent arbitrary code execution and to ensure page layouts remain intact across different devices and updates.

Can I use PowerShell to hide the left sidebar on a specific page?

No. PowerShell can only modify site-level or web-level features, such as disabling the Quick Launch entirely. It cannot target and hide the navigation on an individual modern page.

Is there any official way to hide the left navigation on just one page?

Currently, Microsoft does not provide an out-of-the-box configuration to hide the left navigation on a per-page basis for Team sites. Creating a 'Communication Site' removes the left navigation globally, but individual page toggles do not exist.