0

I'm hoping to add a plain black border to break up the columns on what is going to be a list with a lot of columns.

enter image description here

Thank you!

1 Answer 1

0

You can use following JSON column formatting in order to apply border

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "attributes": {
    "class": "sp-field-borderRightRegular sp-field-borderRightSolid"
  },
  "txtContent": "@currentField"
}

You can also use other border class like sp-field-borderLeftRegular and sp-field-borderLeftSolid

You need to apply column formatting to all the columns where you need border and make sure that in case of special field like Lookup, Managed Metadata, Image you need to handle rendering separating. Currently in above JSON,I have used @currentField which will work fine for normal text, number fields.

In my case it looks like as below enter image description here

I couldn't find those class names in official documentation, I found it from here.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.