Hi Jean, welcome to the forum! I am glad to be able to help you.
Per our research on this issue, since JSON formatting does not currently support formatting the column headers.
You can only format the item in column using the below JSON.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"font-size": "12px"
},
"txtContent": "@currentField",
"customCardProps": {
"formatter": {
"elmType": "div",
"txtContent": "TestDescription",
"style": {
"font-size": "12px",
"color": "green",
"padding": "5px"
}
},
"openOnEvent": "hover",
"directionalHint": "bottomCenter",
"isBeakVisible": true,
"beakStyle": {
"backgroundColor": "white"
}
}
}
Please note that you need to manually type the description in txtContent attribute in formatter for every column. Due to known limitations, JSON code cannot get column descriptions in the edit bar.
Hope this helps.
Best Regards.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.