When creating an SPFx Extension for a custom header, provide a configurable property that allows the composite header to be hidden
When developing a SharePoint Framework Extension to display a custom header and/or footer, the SharePoint Composite Header can be very redundant to the custom header.
The Composite Header (css classname is 'ms-compositeHeader'), is what SharePoint provide out of the box and includes the square site logo, site name and navigation.
When creating your own custom header that includes all of these things and possibly more, the existence of the Composite Header is redundant and can be confusing for users...(Ex: redundant navigation).
While CSS can be used to hide this, such a technique is not playing within the rules of only controlling the DOM elements created by the extension.
This request is to have a configurable property created that can hide the composite header to remove the redundancy when creating a custom header.
This could be a site property configured using PowerShell or a property defined in the SPFx Extension itself.
This would help ensure that rogue overriding of the CSS to hide the Composite Header does not occur and helps developers to stay within the rules requested by Microsoft when developing for the Modern Experience.
I have exactly the same requirement to hide SharePoint default composite header without waiting a few seconds
David Opdendries commented
I added a somewhat related user voice to be able to hide the hub site navigation menu so you don't end up with two menu's at the top of the page when you are using an extension to render a header menu.
Chandra Kollipara commented
Our Intranet is on custom publishing site and want to move the same to communication sites and need this feature to implement the functionality without hacking
Joel Chmiel commented
Nice idea! This would be very helpful and better than “hacking” it with CSS.