pnp/list-formatting
repository·master·Indexed 24 days ago
https://github.com/pnp/list-formattingA community-driven open-source repository of JSON samples for SharePoint List, View, and Form formatting. It provides declarative customization patterns for developers, including samples for interactive approval buttons, status icons for Content Approval and Approvals in Lists, date calculations, custom hover cards, and conditional formatting based on field values.
What's inside pnp-list-formatting
- This sample demonstrates how to apply conditional formatting to a list row based on the number of likes an item has received. Specifically, it changes the background color of a row when the number of likes is 2 or more.
Overview of the Product Catalog sample
masterThe Product Catalog sample demonstrates advanced SharePoint list formatting techniques, specifically:
- Using view formatting to format lists and display list views within web parts.
- Creating functional links to download documents directly from SharePoint Document libraries.
What is the Formatter Generator for HTML
masterThe Formatter Generator for HTML is a tool designed to convert HTML snippets into the JSON format required for SharePoint list formatting.
It supports the following HTML tags:
<div><span><a><img><button><svg><path>
The tool processes
styletags and inline style attributes, as well as CSS provided via a dedicated CSS pane. Note that while the preview window handles most basic scenarios, the final output in SharePoint may occasionally differ.Overview of Picture Link Tiles sample
masterThe Picture Link Tiles sample is a SharePoint list formatting solution that creates a visual link collection using images and a Gallery view layout. It organizes links into groups based on a category column.
Solution File:
picture-link-tiles.json
Authors: Tetsuya Kawahara & WatanaAccess SharePoint and Microsoft Lists View Formatting samples
masterThe
pnp/list-formattingrepository provides a collection of View Formatting samples designed for use in SharePoint Online and Microsoft Lists. Samples are organized into dedicated folders, each containing aREADME.md, screenshots, and the JSON configuration required to apply the sample to your environment.You can browse these samples in two ways:
- Full Gallery: View a friendly, searchable display of all available view samples at the View Samples documentation site.
- Categorized Groupings: Find specific samples by filtering through various groupings such as operators, tokens, authors, or class usage at the Groupings documentation site.
Explore SharePoint Column Formatting Samples
masterThe
pnp/list-formattingrepository provides a wide variety of JSON-based column formatting samples for SharePoint Lists and Document Libraries. These samples demonstrate how to transform standard column displays into rich UI elements like charts, buttons, QR codes, and interactive cards.Common use cases include:
- Data Visualization: Doughnut charts for percentages or multi-path SVGs for data representation.
- File Management: Download buttons, file previews (including embedded content), and file thumbnails using the
@thumbnailtoken. - Interactivity: Buttons to trigger Power Automate flows, update field values, or expand/collapse content.
- Enhanced Information: Converting location properties into full addresses, displaying weather details, or turning text into dynamic hyperlinks (e.g., stock tickers to Yahoo Finance).
Explore SharePoint List Formatting samples by category
masterThe
pnp/list-formattingrepository provides a collection of SharePoint List Formatting samples categorized by their functional approach. These samples can be used as templates or reference implementations for:- Board Views: Customizing board views with features like tagging, timelines, or sticky note styles.
- Charts: Generating visual data representations such as Bar Charts, Pie Charts, and Gauges using either Column or View formatting.
- CommandBar Customization: Modifying the SharePoint command bar to hide buttons, display specific actions (like 'Edit in grid view'), or transform list items into specialized card formats.
Each sample is available in the repository as either a
view-sample(applying to the entire list view) or acolumn-sample(applying to a specific column).View SharePoint List Formatting Samples by Author
masterThe
pnp/list-formattingrepository contains a collection of SharePoint List Formatting samples categorized by their author. These samples include:- View Formats: Templates that customize the entire list view (e.g., dashboards, charts, timelines).
- Column Formats: Templates that customize the appearance of a specific column (e.g., progress bars, conditional colors, links).
- Form Formats: Templates that customize the list item edit/new form (e.g., custom headers).
You can browse these samples on GitHub to find specific implementations for features like bar graphs, task cards, or conditional styling.
Explore SharePoint List Formatting Samples by Feature
masterThe
pnp/list-formattingrepository provides a wide variety of view formatting samples that can be applied to SharePoint lists and document libraries. These samples demonstrate how to transform standard list views into specialized interfaces like cards, dashboards, charts, and galleries.Key categories of samples include:
- Card Layouts:
Numbered List Card,Numeric card format,Person Cards,Person Quote Card,Planner Inspired Task Cards,Praise Cards,Pricing Table,Prompt Cards,Property Card, andQR Code Tile. - Dashboards & Charts:
Numeric Average Comparison,Percent Chart format,Project Gantt Chart, andProject Health Dashboard. - Specialized Views:
Out of Office(employee time away),Payments(expense tracking),Photo Gallery(document library gallery),Piano(custom visual layout), andProduct Catalog. - Interactive & Visual Elements:
Rating in Tiles(clickable rating experience),Random Item(layering/z-index demonstration), andPicture Link Tiles(customized gallery/tile layouts).
You can find the source code and JSON formatting definitions for each sample in the
view-samples/directory of the repository.- Card Layouts:
Browse List Formatting sample types
masterThe repository provides ready-to-use JSON samples for three main areas of SharePoint customization:
- Column Formatting: Customizes individual columns within a list.
- View Formatting: Customizes the entire layout and appearance of a list view.
- Form Formatting: Customizes the appearance and layout of the list item forms.
Explore SharePoint List Formatting Samples
masterThis repository provides a collection of JSON-based formatting samples used to customize how fields are displayed in SharePoint lists and libraries. You can use these samples to implement column, view, or form formatting by constructing JSON objects that describe elements and styles.
Available sample categories include:
- Column Formatting: Customizes individual field displays within a list.
- View Formatting: Customizes the layout and appearance of an entire list view.
- Form Formatting: Customizes the appearance of SharePoint forms.
Explore SharePoint List Formatting samples by Action
masterThe
pnp/list-formattingrepository provides a collection of JSON-based formatting samples for SharePoint Lists and Columns. These samples are categorized by the type of user interaction or 'Action' they enable.Key sample categories include:
- View Formats: Transform the entire list view (e.g., Board views, Bulletin Boards, Discussion Boards, Video Galleries, or Custom Hover Cards).
- Column Formats: Customize specific columns to provide visual cues (e.g., highlighting non-empty folders) or to act as interactive buttons (e.g., Row Actions).
You can browse these samples in the repository to find patterns for complex UI requirements like tagging, inline editing, or integrating with Power Apps.