Group Header with Icon
Overview
- Adds an icon keyed to each group’s value in the group header
- Icons come from SharePoint’s built-in Fluent set, so nothing is installed
- The icon, value, and item count read together for fast scanning
- The collapse and expand behavior stays native to SharePoint grouping
- Applied as view formatting JSON on the group header, so it changes nothing about the rows or the data
- Each value maps to its own icon and color, easy to adapt
Common Use Cases
- Activities grouped by type
- Items grouped by category
- Requests grouped by channel
- Content grouped by format
- Tasks grouped by priority
- Any grouped list that benefits from icons
Details
- Pattern: Grouped Views
- Scope: View
Required Columns
| Display name | Column type | Internal name |
|---|---|---|
| Title | Single line of text | [Title] |
| Type | Choice | [Type] |
| Assigned To | Person or Group | [AssignedTo] |
Prerequisites
- Build a list with these columns before you paste the JSON.
- Populate the list with data.
How to Apply JSON code
- Group the view by Type (open the Type column header menu and choose Group by Type, or set it under view settings).
- Open the view dropdown at the top right and choose Format current view.
- Switch to Advanced mode, paste the JSON below, and click Save.
JSON Code
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/view-formatting.schema.json",
"groupProps": {
"headerFormatter": {
"elmType": "div",
"style": {
"display": "flex",
"align-items": "center",
"box-sizing": "border-box",
"width": "100%",
"padding": "8px 12px",
"border-bottom": "1px solid #edebe9"
},
"children": [
{
"elmType": "div",
"style": {
"display": "flex",
"align-items": "center",
"justify-content": "center",
"width": "24px",
"height": "24px",
"border-radius": "6px",
"margin-right": "10px",
"background-color": "=if(@group.fieldData == 'Meeting', '#0078d4', if(@group.fieldData == 'Email', '#038387', if(@group.fieldData == 'Call', '#ca5010', if(@group.fieldData == 'Task', '#107c10', '#605e5c'))))"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "=if(@group.fieldData == 'Meeting', 'Calendar', if(@group.fieldData == 'Email', 'Mail', if(@group.fieldData == 'Call', 'Phone', if(@group.fieldData == 'Task', 'CheckList', 'List'))))"
},
"style": {
"font-size": "13px",
"color": "#ffffff"
}
}
]
},
{
"elmType": "div",
"style": {
"font-size": "14px",
"font-weight": "700",
"color": "#242424"
},
"txtContent": "@group.fieldData"
},
{
"elmType": "div",
"style": {
"font-size": "12px",
"color": "#8a8886",
"margin-left": "10px"
},
"txtContent": "=@group.count + ' items'"
}
]
}
}
}
Common Questions About the Group Header with Icon
What is the Group Header with Icon built with?
It is built with a standard Microsoft List (SharePoint list) and view formatting JSON applied to the group header, using SharePoint’s built-in icons. There is no custom development, no SPFx solution, and no third-party tools. It is the kind of clean, maintainable formatting Greg Zelfond builds for teams that want clearer grouped views without ongoing development overhead.
Where do the icons come from?
They come from the Fluent icon set that ships with SharePoint and Microsoft 365, referenced by name in the JSON. Nothing is uploaded or installed, and the icons render natively and stay crisp at any zoom.
Does this change how grouping works?
No. SharePoint still does the grouping and the collapse and expand. The JSON only adds the icon and tidies the header, so all the normal grouped-view behavior stays the same.
Does this design use any custom development or third-party tools?
No. It uses only out-of-the-box SharePoint view formatting, which Microsoft supports natively. That keeps it stable and easy to maintain, and nothing breaks when SharePoint is updated. Out-of-the-box is the only way Greg builds, so you can own and extend the design yourself for years.
If LookBook 365 is code-free and out-of-the-box, why does this example include JSON?
Because SharePoint formatting JSON is not custom code – it is a native configuration feature built into lists and libraries. It is declarative: it only describes how existing columns and views look, and cannot run scripts, reach external services, or change your data. Nothing is deployed and nothing breaks when Microsoft updates SharePoint, and you can edit or remove it anytime. That is why LookBook 365 treats it as out-of-the-box and low risk.
Can Greg build a view like this for our team?
Yes – this is exactly the kind of work Greg Zelfond does. As an independent SharePoint consultant and Microsoft MVP, he designs out-of-the-box list and library formatting like this so your team can read and maintain it without a developer. Reach out through the contact page to talk about your lists.