Wrapping the Title field in SharePoint

The Title field provides the default click behavior of launching the Edit Form, so you can’t apply word wrap formatting the same way you’d add formatting to a different column if you want to maintain the click behavior.

Here is the JSON you can use to wrap that text in the Title column and also maintain the default click behavior and the formatting (I’ve added some styling in my JSON).

Title field showing text truncated "This is a really long title for this item becau..."
Title field pre-JSON formatting

Notice that the out-of-the-box behavior for the Title field doesn’t have a text wrap option.

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/view-formatting.schema.json",
"rowFormatter": {
"elmType": "div",
"attributes": {
"class": "ms-bgColor-neutralLighterAlt"
},
"customRowAction": {
"action": "defaultClick"
},
"style": {
"display": "flex",
"flex-direction": "row",
"overflow": "visible"
},
"children": [
{
"elmType": "span",
"style": {
"white-space": "normal",
"overflow": "visible"
},
"txtContent": "[$Title]"
}
]
}
}

To add this JSON to a list view, choose the Title field drop down arrow and choose Column Settings > Format this column

Menu from the Title drop down chooser > Column settings > Format this column
Choosing Format this column from the Title > Column settings.

In the Format Title column JSON task pane, paste the JSON.

Format Title Column task pane with JSON added
Adding the JSON

I also added some styling to change the cursor to a pointer and provided a font-weight of 600 and some padding. You can add other style formatting as you prefer. This is my result:

Title field post JSON formatting showing the text wrapped in the column. "this is a really long title for this item because I want to see if it will wrap"
Title field post JSON formatting

The Title field is now bold and when selected opens the Edit Form for the item.

Leave a Reply

Hi, I’m Colleen Parker

Colleen Parker headshot. Woman with long white hair and blue eyes.

M365 Functional Consultant

Are you ready to supercharge your organization’s productivity and efficiency with Microsoft 365? I can help you unlock the full potential of this powerful suite of tools. I bring expertise in understanding your unique business needs and can tailor Microsoft 365 solutions to streamline your workflows, optimize collaboration, and drive innovation. From seamless integration of applications to customized training for your team, I ensure that you harness the full power of Microsoft 365 to drive growth and success.

Let’s connect!

Discover more from Eyes on M365

Subscribe now to keep reading and get access to the full archive.

Continue reading