-I copied this image from a post on answers.microsoft.com, and am having the same issue.

-I know that a user can enlarge the "name" field on their workstation and it should stick for them, but I want the name field to fill the area so they do not have to enlarge it.

-I have tried setting the width of the name on the document library and then saving the view. It works for me, but not for others.

-Any ideas on how I can set a default width on the "Name" field on a document library so users do not have to adjust the width?

Example from answers.microsoft.com - not my screen shot but same problem


Unfortunately, in Modern Views in SPO, we can't set default width for [Name] column in Document Library. I was hoping that we could use JSON formatting. However, it's not supported for the following columns:

  • Managed Metadata
  • Filename (in Document Libraries)
  • Retention Label
  • Sealed columns
  • Multi-Line Text column with enhanced rich text

More info on column formatting can be found here


If we use Json format as shown below to change the width of column value:

  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField",
  "style": {
    "width": "500px"

The field value width has been modified with 500px:

enter image description here

However this doensn't work for the column bar, which means JSON format can not achieve this.It can only change inner div style.

enter image description here

We suggest you use SPFx extension to inject css file change outer div style.

Similar issue for your reference:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.