Forum Discussion
Modern Document Library Webpart full width
Hi All,
I got a question from a user stating that they wonder why the Document Library webpart does not span the full width of the page? Any settings I'm missing or is this by design and cannot be changed?
I would be able to expand the webpart width over the marked space? If its possible?
- You are pretty much stuck with it. I wish they would allow us more options on webpart zone sizing, but they mostly do this to help with responsive design.
- Martin SagerstrandBrass Contributor
Hi Chris,
thanks for the information, then I know that there is a limitation.
regards
Martin
- Carry4IT MegensBrass Contributor
Martin Sagerstrand I too have a client asking the very same question.
Business justification:
With Document management libraries usually a couple of metadata columns need to be displayed and then full width makes a lot of sense.
The possibility for full witdh on Modern SharePoint is now only avialable (afaik) for Image and Hero Webpart.
The only thing required is the property fullBleed in the webpart's manifest.
How to add SPFx webpart to full-width column (velingeorgiev.com)
Can Microsoft SPO team react to this request, please?
- Martin SagerstrandBrass Contributor
Carry4IT Megens interesting 🙂
I have seen many cases where a full with doc library would be a nice feature and users always asking why it cant be full with..
regards
Martin
- ArefHalmstrandSteel Contributor
Martin Sagerstrand
Hi,
This is actually possible to configure with coding (adding a custom SPFx web part) that changes the limitations. However, this would require having maintenance, someone stand-by to be able to help out when Microsoft does changes to the core structure. So that the design changes can adapt to SharePoint responsive design.
The code itself only requires 3 lines of code at maximum. The real challenge is to have someone to understand what it does and be able to maintain it when required.
Yours sincerely,
Aref Halmstrand - ArefHalmstrandSteel Contributor
I have uploaded an image here as example when using full width of the page.
Yours sincerely,
Aref Halmstrand- carry2webCopper ContributorArefHalmstrand thank you for your follow up. Exactly that: it requires a custom webpart.
Why does Microsoft not provide the option ootb?
I cannot understand.- Martin SagerstrandBrass Contributor
Nice,
yes that is a shame, this should def. be an OOTB feature
//Martin
- sadiqnaCopper Contributor
Can you please guide me with sample code in this regard ,how to achieve this using webpart spfx ?. I am beginner on spfx development.
- Carry4IT MegensBrass Contributor
sadiqna
First setup your environment
Get started with the SharePoint Framework - Learn | Microsoft Docs
Then this is a good blog post for your first custom webpartCreate Web Part With SharePoint Framework (SPFx) (c-sharpcorner.com)
- FLebbyCopper Contributor
Martin Sagerstrand has this issue never been resolved? This is a lot of unused whitespace, and I wanted to expand the width Document List, not one of the columns' widths within...