Back to view formats
View formattingSharePoint Online

Honeycomb Links

Formats links to look like honeycombs!

Honeycomb Link
Sample preview · View original image

Copy. Apply. Make it yours.

Get this format

1 definition

Review the requirements below, then paste this JSON into the matching formatting panel. Show me where.

Use your list's internal column names and replace any tenant-specific URLs or flow IDs. Formatting is presentation, not a way to secure data.

View formatting
Download JSON
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "hideSelection": true,
  "hideColumnHeader": true,
  "rowFormatter": {
    "elmType": "div",
    "children": [
      {
        "elmType": "div",
        "style": {
          "height": "150px",
          "display": "=if(@rowIndex%5==0,'','none')"
        }
      },
      {
        "elmType": "div",
        "style": {
          "position": "absolute",
          "width": "150px",
          "height": "150px",
          "left": "=if(floor(@rowIndex/5)%2==0,@rowIndex%5*170+'px',@rowIndex%5*170+85+'px')",
          "margin-bottom": "=if(@rowIndex%5==0,'','150px')"
        },
        "children": [
          {
            "elmType": "a",
            "style": {
              "position": "relative",
              "display": "flex",
              "justify-content": "center",
              "align-items": "center",
              "width": "100%",
              "height": "100%",
              "top": "=if(floor(@rowIndex/5)>0,floor(@rowIndex/5)+'px','')"
            },
            "attributes": {
              "href": "[$URL]",
              "target": "_blank",
              "class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover"
            },
            "children": [
              {
                "elmType": "svg",
                "style": {
                  "fill": "currentColor",
                  "cursor": "pointer"
                },
                "attributes": {
                  "viewBox": "-150 -150 300 300"
                },
                "children": [
                  {
                    "elmType": "path",
                    "attributes": {
                      "d": "M130 75 L0 150 L-130 75 L-130 -75 L-0 -150 L130 -75 z"
                    }
                  }
                ]
              },
              {
                "elmType": "div",
                "style": {
                  "position": "absolute",
                  "display": "flex",
                  "flex-direction": "column",
                  "align-items": "center",
                  "justify-content": "center",
                  "cursor": "pointer",
                  "width": "100%",
                  "height": "100%"
                },
                "attributes": {
                  "class": "ms-fontColor-white"
                },
                "children": [
                  {
                    "elmType": "div",
                    "style": {
                      "font-size": "32px",
                      "margin-bottom": "5px"
                    },
                    "attributes": {
                      "iconName": "[$Icon]"
                    }
                  },
                  {
                    "elmType": "div",
                    "style": {
                      "font-size": "14px",
                      "width": "75%",
                      "text-align": "center"
                    },
                    "txtContent": "[$Title]"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}

From the contributor

How to use this sample

Summary

This sample demonstrates a honeycomb structure of links. The hexagons are displayed using SVG, so that five hexagons are displayed per line. This sample uses the Icons from the Fluent UI. The name of the icon is referenced through an Icon field.

screenshot of the sample

View requirements

Type Internal Name Required
Single line of text Title Yes
Single line of text URL Yes
Single line of text Icon Yes

Sample

Solution Author(s)
honeycomb-link.json Tetsuya Kawahara

Version history

Version Date Comments
1.0 July 5, 2021 Initial release
1.1 June 11, 2022 Fixed where to apply mouse hover effect
1.2 March 29, 2023 Fixed links not displaying when using List Web Part
1.3 June 11, 2024 Fixed a layout collapse when opened in Microsoft Lists App

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Additional notes