DEV Community

thebernardlim
thebernardlim

Posted on • Edited on

4

SharePoint List Advanced Formatting - What classes and icons can we use?

One of the common attributes when formatting SharePoint lists are classes and icons. It can get confusing to know what are the actual values that are available to use, as the official documentation does not list this down.

Below is some guidance which will hopefully help.

Class

How to use?

Attribute: "class"

Example



  "attributes": {
        "class": "sp-field-severity--warning"
  }


Enter fullscreen mode Exit fullscreen mode

Class example

Class Source

https://pnp.github.io/List-Formatting/groupings/classes/sp-field/

 

Icons

How to use?

Attribute: iconName

Example



"attributes": {
        "iconName": "CheckMark"
      }


Enter fullscreen mode Exit fullscreen mode

In this example CheckMark is the name of the icon being used.
Note that the icon value is not case-sensitive, hence a lower-cased'checkmark' will still work.

Icons1

Icon Source

https://developer.microsoft.com/en-us/fluentui#/styles/web/icons

Icons2

Billboard image

Imagine monitoring that's actually built for developers

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay