pnp/list-formatting

repository·master·Indexed 24 days ago

https://github.com/pnp/list-formatting

A 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.

Tokens
158.9K
Snippets
241
Records
1.1K
Agent score
80%

What's inside pnp-list-formatting

  1. What is the Formatter Generator for HTML

    master

    The 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 style tags 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.

  2. Access SharePoint and Microsoft Lists View Formatting samples

    master

    The pnp/list-formatting repository provides a collection of View Formatting samples designed for use in SharePoint Online and Microsoft Lists. Samples are organized into dedicated folders, each containing a README.md, screenshots, and the JSON configuration required to apply the sample to your environment.

    You can browse these samples in two ways:

    1. Full Gallery: View a friendly, searchable display of all available view samples at the View Samples documentation site.
    2. Categorized Groupings: Find specific samples by filtering through various groupings such as operators, tokens, authors, or class usage at the Groupings documentation site.
  3. Explore SharePoint Column Formatting Samples

    master

    The pnp/list-formatting repository 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 @thumbnail token.
    • 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).
  4. Explore SharePoint List Formatting samples by category

    master

    The pnp/list-formatting repository 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 a column-sample (applying to a specific column).

  5. View SharePoint List Formatting Samples by Author

    master

    The pnp/list-formatting repository 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.

  6. Explore SharePoint List Formatting Samples by Feature

    master

    The pnp/list-formatting repository 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, and QR Code Tile.
    • Dashboards & Charts: Numeric Average Comparison, Percent Chart format, Project Gantt Chart, and Project Health Dashboard.
    • Specialized Views: Out of Office (employee time away), Payments (expense tracking), Photo Gallery (document library gallery), Piano (custom visual layout), and Product Catalog.
    • Interactive & Visual Elements: Rating in Tiles (clickable rating experience), Random Item (layering/z-index demonstration), and Picture 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.

  7. Browse List Formatting sample types

    master

    The 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.
  8. Explore SharePoint List Formatting Samples

    master

    This 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.
  9. Explore SharePoint List Formatting samples by Action

    master

    The pnp/list-formatting repository 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.