Microsoft and some amazing contributors have given us the ability to format our list columns in Modern Lists & Libraries to provide a great user experience to our users when viewing lists.
There are three different formatting options, you can see examples of them in the links below where I’ve extracted the open source published Github samples in an easy to view visual manner:
- Option 1 – Column Formatting – Examples
- Option 2 – Row/View Formatting – Examples
- Option 3 – Form Formatting – Examples
This post is focused on modern SharePoint Online List Formatting –> Column Formatting examples shown to you in a manner which you can easily pick and choose the option you like with the direct link to the Github sample so you can easily use in your own lists.
To do this, you construct a JSON object that describes the elements that are displayed when a field is included in a list view, and the styles to be applied to those elements.
Luckily for us, most of the work is already done and all we have to do is copy and paste the JSON for the format we want from the Git repository. It’s as simple as going to your List column –> Column settings –> “Format this column” option and pasting in the JSON that has already been constructed by the contributors.
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples
I put this blog together as mostly a quick reference to myself so I can quickly choose a list column user experience to give to my clients based on a sample image that the column format does. Credit to the open source contributors for developing this JSON.
Update a Status (Choice) and a Person field using Buttons and the setValue action
Display number of Comments on current item
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/comment-count
Custom hover card on Lists
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/custom-hover-cards
Formatting a column when a date column is blank
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/date-check-blank-format
Formatting of Date column to compress date value in different style
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/date-compress-format
Date Difference
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/date-difference
Monthly Emoji
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/date-monthly-emoji
Page-a-day Calendar
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/date-page-a-day-calendar
Concatenate Currency Symbol to Numeric Columns
Formatting an item when a date column is before or after today’s date
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/date-range-format
Creating Red-Amber-Green (RAG) bars based on date ranges
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/date-range-rag
File Thumbnails
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/file-thumbnail
Approval Status Hover Card
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-approval-status-hover-card
Centered Content
Inline Column Chart
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-column-chart
Display Comment Count
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-comment-count
File Preview
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-file-preview
Turn FileRef field into clickable thumbnail hyperlink
Turn field values into hyperlinks
Icon Overlays
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-icon-overlay
Issue Status Pill
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-issuestatus-pill
Launch Power App Button
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-launch-powerapp
Like/Unlike list item
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-like-unlike
Display users who have liked
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-likedby
Mail To Button
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-mailto-button
Project Indicator Formats
Centered Content
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-right-align
Row Index Drawing
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-rowIndex-drawing
Row Actions
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-rowactions
Linking to the scheduling dialog in Microsoft Teams and Microsoft Outlook
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-scheduling-link
Display social media profile pics using social media handles
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/generic-socialpic
Create a button to conditionally launch a Flow for the selected item
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-start-flow-conditionally
Create a button to launch a Flow for the selected item
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/generic-start-flow
Displays a customizable Google map image for a given location
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/generic-staticmap
Substring Status
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-substring-status
SVG icons
Display Twitter profile pics using Twitter handles
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/generic-twitterpic
Time Schedule
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-time-schedule
Timeline Format
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-timeline
Display Twitter profile pics using Twitter handles
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-twitterpic
Yearly Gantt Chart
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-yearly-gantt-chart
Youtube Thumbnail
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-youtube-thumbnail
Image Lightbox
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/image-lightbox
Display Location Address Details
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/location-address
Display Location Weather Details
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/location-weather
Managed Metadata Tag Icon
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/managed-metadata-tag-icon
Multi-Choice forEach
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/multi-choice-foreach
Multi-Choice Icons
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/multi-choice-icons
Multi-Choice link
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/multi-choice-link
Work Progress Category Pill
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/multi-choice-workcategory-pill
Multi-lookup fields and projected fields
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/multi-lookup-projected-field
Highlight the current user
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/multi-person-currentuser
Multi-Person Facepile
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/multi-person-facepile
Like / Dislike – Unique reaction
Reacting and displaying users who have reacted
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/multi-person-reaction
Multi-Person Teams Chat Link
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/multi-person-teams-chat-link
Determine Tolerance Comparison using abs()
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-abs-tolerance-comparison
Background color shading by number column value
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-background-color-shading
Number Battery
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-battery
Number Circle in Circle
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-circle-in-circle
Conditional formatting based on a number range
Conditional Progress Color
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-conditional-progress-color
Display count-up and count-down buttons
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-countup-countdown
Format a number column as a number/percentage data bar
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/number-data-bar
Doughnut Chart
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-doughnut-chart
Number Gauge
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-gauge
Icon Progress Bar
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-icon-progressbar
Formatting percentage number (%) to pie chart
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/number-piechart
Smiley faces for good quiz results
Show trending up/trending down icons
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/number-trending-icon
Publishing Status
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/number-using-modulo-publish
Highlight the current user
Person Mail To Link
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/person-mailto
Display a person’s profile picture in a circle
Display a picture column as a circle
Displays a customizable Bing Map image for a given location in a Multi-Line of Text Field
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/text-bing-map
Conditional formatting based on the value in a text or choice field
Text Contains
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/text-contains
Formatting an ISBN (text column) to book cover image. Images are retrieved by calling Open Library Covers API
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/text-isbn-image
Demonstrates how to reference a local image
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/text-local-image
Traffic Light (Red-Yellow-Green) Status Indicator
Text StartsWith Calling Codes
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/text-startswith-callingcodes
Strikethrough on Completion
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/text-strikethrough
Formatting column with long text to multiple-line with word wrap.
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/text-wrap-format
Yes/No Checkbox
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/yesno-checkbox
Formatting Yes/No field to check mark based on the value in the field
Yes/No Column Check Mark
Reference: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples/yesno-checkmark
Yes/No Column Toggle
Reference: https://github.com/pnp/List-Formatting/tree/master/column-samples/yesno-toggle-format
So helpful! Thanks for putting this together.
Perfect