SharePoint List Formatting JSON Examples

SharePoint list formatting with JSON is a powerful way to customize the appearance and behavior of your lists, enhancing user experience and productivity. JSON (JavaScript Object Notation) allows you to define complex data structures and apply them to your SharePoint lists, enabling a wide range of formatting options.

SharePoint List Title Column [Remove or Hide Title Column With Examples]
SharePoint List Title Column [Remove or Hide Title Column With Examples]

In this article, we'll explore the basics of SharePoint list formatting with JSON, its benefits, and provide practical examples to help you get started. Whether you're a seasoned SharePoint user or just starting out, understanding and leveraging JSON formatting can significantly improve your SharePoint experience.

SharePoint List JSON Form Formatting & Validations (3)
SharePoint List JSON Form Formatting & Validations (3)

Understanding SharePoint List Formatting with JSON

SharePoint list formatting with JSON enables you to apply custom styles, conditional formatting, and interactive features to your lists. By using JSON, you can create dynamic and responsive list views that adapt to different screen sizes and devices.

SharePoint List Formatting for Grouped Views
SharePoint List Formatting for Grouped Views

JSON formatting provides a flexible and powerful alternative to traditional SharePoint formatting options, allowing you to fine-tune the look and feel of your lists to match your organization's branding or specific use cases.

Benefits of Using JSON Formatting

Display SharePoint List Items in a SPFX Web Part [Tabular Format]
Display SharePoint List Items in a SPFX Web Part [Tabular Format]

JSON formatting offers several benefits, including:

  • Customization: JSON allows for highly customized list formatting, enabling you to create unique and engaging list views.
  • Responsiveness: JSON-formatted lists can adapt to different screen sizes and devices, ensuring a consistent user experience across various platforms.
  • Interactivity: JSON enables you to add interactive features, such as hover effects, click events, and dynamic content updates.
  • Reusability: JSON formatting can be applied to multiple lists and libraries, saving time and ensuring consistency across your SharePoint environment.

Getting Started with JSON Formatting

SharePoint Pages Design Best Practices
SharePoint Pages Design Best Practices

To start using JSON formatting in SharePoint, you'll need to enable the "Modern experience" for your site collection and ensure that your SharePoint version supports JSON formatting. Once enabled, you can apply JSON formatting to your lists using the "Format as" menu in the list view command bar.

You can create and edit JSON formatting files using any text editor, or use SharePoint's built-in JSON editor for a more user-friendly experience. To apply a JSON file to your list, simply upload it and select it from the "Format as" menu.

JSON Formatting Examples

How to List Unique Permissions for Files and Folders on a SharePoint Site
How to List Unique Permissions for Files and Folders on a SharePoint Site

Now that we've covered the basics of SharePoint list formatting with JSON, let's explore some practical examples to help you get started.

In the following sections, we'll demonstrate how to create custom styles, apply conditional formatting, and add interactive features using JSON.

Add Conditional Formatting to a SharePoint Online List
Add Conditional Formatting to a SharePoint Online List
Why You Should Never Embed Document Libraries and Lists into SharePoint Pages
Why You Should Never Embed Document Libraries and Lists into SharePoint Pages
SharePoint for Beginners: A complete guide to getting started
SharePoint for Beginners: A complete guide to getting started
Connect SharePoint List To Excel - Part 2
Connect SharePoint List To Excel - Part 2
Site Collections, Sites, Pages, Document Libraries, and Folders - putting it all together | SharePoint Maven
Site Collections, Sites, Pages, Document Libraries, and Folders - putting it all together | SharePoint Maven
SharePoint Sites Naming Convention Best Practices
SharePoint Sites Naming Convention Best Practices
Create SharePoint Lists Faster Using Templates
Create SharePoint Lists Faster Using Templates
SharePoint Page Section Templates Explained
SharePoint Page Section Templates Explained
Some Top Reasons to Use SharePoint
Some Top Reasons to Use SharePoint
How to customize Forms in SharePoint Lists 📃
How to customize Forms in SharePoint Lists 📃
Learn How To Implement Sharepoint List Validation
Learn How To Implement Sharepoint List Validation
Learn How To Create a Custom List in SharePoint Online
Learn How To Create a Custom List in SharePoint Online
How to Copy a SharePoint List Structure (Without Starting From Scratch)
How to Copy a SharePoint List Structure (Without Starting From Scratch)
the sharepoint knowledge base framework
the sharepoint knowledge base framework
4 Views of a Custom List
4 Views of a Custom List
How to Design a SharePoint Site - Quick Read
How to Design a SharePoint Site - Quick Read
the steps to managing permisions info sheet is shown in blue and pink colors
the steps to managing permisions info sheet is shown in blue and pink colors
How to Personalize SharePoint for Users
How to Personalize SharePoint for Users
the different types of librarians in sharepoint
the different types of librarians in sharepoint
How to Create a Custom List in SharePoint | Beginner Tutorial
How to Create a Custom List in SharePoint | Beginner Tutorial

Customizing List Styles with JSON

JSON allows you to apply custom styles to your list views, enabling you to create visually appealing and consistent list experiences. You can define styles for various list elements, such as headers, rows, and cells, using CSS properties within your JSON file.

Here's an example of a simple JSON file that applies custom styles to a SharePoint list:


{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "additionalRowClass": "sp-field-severity--high",
  "fields": {
    "Title": {
      "fontWeight": "bold",
      "fontSize": "14pt"
    },
    "Description": {
      "fontStyle": "italic"
    }
  }
}

In this example, the list's additionalRowClass property is set to "sp-field-severity--high", which applies a high severity style to each row. Additionally, the Title and Description fields have custom font weights, sizes, and styles applied.

Applying Condit