Back to column formats
Column formattingSharePoint Online

Icon Progress Bar

This sample demonstrates creating a progress bar using icons. The number column represents the stage in a process and the format provides a visual indicator of where an item is in relation to the process by showing the previous steps as completed, highlighting the current step, and indicating which steps remain.

Icon Progress Bar formatting preview
Sample preview · View original image

Copy. Apply. Make it yours.

Get this format

1 definition

Review the requirements below, then paste this JSON into the matching formatting panel. Show me where.

Use your list's internal column names and replace any tenant-specific URLs or flow IDs. Formatting is presentation, not a way to secure data.

Column formatting
Download JSON
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "font-size": "16px"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "title": "Step 1",
        "iconName": "=if(@currentField < 1, 'CircleRing', 'SkypeCircleCheck')",
        "class": "='ms-fontColor-' + if(@currentField == 1, 'green', if(@currentField > 1, 'greenLight', 'neutralLight'))"
      },
      "style": {
        "padding": "0 2px"
      }
    },
    {
      "elmType": "span",
      "attributes": {
        "title": "Step 2",
        "iconName": "=if(@currentField < 2, 'CircleRing', 'SkypeCircleCheck')",
        "class": "='ms-fontColor-' + if(@currentField == 2, 'green', if(@currentField > 2, 'greenLight', 'neutralLight'))"
      },
      "style": {
        "padding": "0 2px"
      }
    },
    {
      "elmType": "span",
      "attributes": {
        "title": "Step 3",
        "iconName": "=if(@currentField < 3, 'CircleRing', 'SkypeCircleCheck')",
        "class": "='ms-fontColor-' + if(@currentField == 3, 'green', if(@currentField > 3, 'greenLight', 'neutralLight'))"
      },
      "style": {
        "padding": "0 2px"
      }
    },
    {
      "elmType": "span",
      "attributes": {
        "title": "Step 4",
        "iconName": "=if(@currentField < 4, 'CircleRing', 'SkypeCircleCheck')",
        "class": "='ms-fontColor-' + if(@currentField == 4, 'green', if(@currentField > 4, 'greenLight', 'neutralLight'))"
      },
      "style": {
        "padding": "0 2px"
      }
    },
    {
      "elmType": "span",
      "attributes": {
        "title": "Step 5",
        "iconName": "=if(@currentField < 5, 'CircleRing', 'SkypeCircleCheck')",
        "class": "='ms-fontColor-' + if(@currentField == 5, 'green', if(@currentField > 5, 'greenLight', 'neutralLight'))"
      },
      "style": {
        "padding": "0 2px"
      }
    }
  ]
}

From the contributor

How to use this sample

Summary

This sample demonstrates creating a progress bar using icons. The number column represents the stage in a process and the format provides a visual indicator of where an item is in relation to the process by showing the previous steps as completed, highlighting the current step, and indicating which steps remain.

screenshot of the sample

View requirements

  • This format can be applied to a Number column (the format expects values from 0-5, but can easily be adjusted to account for more)

Sample

Solution Author(s)
number-icon-progressbar.json Julien Seguin

Version history

Version Date Comments
1.0 March 1, 2019 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Additional notes