SPFX Full Bleed WebPart - SPFx Full width

Install

npm install jquery @types/jquery

Include the below in your .ts or .tsx file

import * as jQuery from "jquery";

Add the following lines in the WebPart initialisation.

 public onInit(): Promise<void> {
return super.onInit().then(_ => {
jQuery("#workbenchPageContent").prop("style", "max-width: none");
jQuery(".SPCanvas-canvas").prop("style", "max-width: none");
jQuery(".CanvasZone").prop("style", "max-width: none");
});
}

Comments

Popular posts from this blog

IRM and the Object Model

This content database has a schema version which is not supported in this farm

Activate and Deactivate Feature through PowerShell