Skip to main content

New Item Highlight

The New Item Highlight marks files added or changed in the last week with a NEW ribbon, so fresh content is easy to spot in a busy library. It is built with a standard SharePoint document library and a small piece of column-formatting JSON applied to the Name column. The badge appears automatically based on the created date and disappears once a file is no longer recent.
Author
SharePoint Maven
Built with
Features
Created Column, JSON, Name Column
Category
Formatting

Want one like this?

Talk to Greg
  • Marks recently added files with a NEW ribbon beside the name
  • The badge appears automatically based on the created date
  • It disappears on its own once a file is older than the window
  • The seven-day window is a single number you can change
  • Applied as column-formatting JSON on the Name column, so it changes nothing about the files
  • Works on any document library
  • Busy shared libraries
  • News or announcement document hubs
  • Resource and download libraries
  • Policy update tracking
  • Onboarding material libraries
  • Any library where new files matter
Display nameColumn type
NameSystem Column
CreatedSystem Column
  1. Open your document library (or create one and upload a few files).
  1. On the Name column, open the column header menu, choose Column settings, then Format this column.
  2. Switch to Advanced mode.
  3. Paste the JSON below and click Save.
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "display": "flex",
    "align-items": "center"
  },
  "children": [
    {
      "elmType": "span",
      "style": {
        "font-size": "13px",
        "color": "#242424"
      },
      "txtContent": "[$FileLeafRef]"
    },
    {
      "elmType": "div",
      "style": {
        "display": "=if(Number(Date([$Created])) >= Number(Date(addDays(@now, -7))), 'inline-flex', 'none')",
        "align-items": "center",
        "margin-left": "10px",
        "padding": "1px 8px",
        "border-radius": "10px",
        "background-color": "#107c10"
      },
      "children": [
        {
          "elmType": "span",
          "style": {
            "font-size": "10px",
            "font-weight": "700",
            "color": "#ffffff",
            "letter-spacing": "0.5px"
          },
          "txtContent": "NEW"
        }
      ]
    }
  ]
}
What is the New Item Highlight built with?

It is built with a standard SharePoint document library and a small piece of column-formatting JSON applied to the Name column. There is no custom development, no SPFx solution, and no third-party tools. It is the kind of clean, maintainable formatting Greg Zelfond builds for teams that want to surface fresh content without ongoing development overhead.

How does it decide what is recent?

It compares each file’s created date to the current date, and if the file was added within the last seven days it shows the NEW ribbon. Because it is based on the date, the badge appears and clears on its own.

Does this design use any custom development or third-party tools?

No. It uses only out-of-the-box SharePoint column formatting, which Microsoft supports natively. That keeps it stable and easy to maintain, and nothing breaks when SharePoint is updated. Out-of-the-box is the only way Greg builds, so you can own and extend the design yourself for years.

If LookBook 365 is code-free and out-of-the-box, why does this example include JSON?

Because SharePoint formatting JSON is not custom code – it is a native configuration feature built into lists and libraries. It is declarative: it only describes how existing columns and views look, and cannot run scripts, reach external services, or change your data. Nothing is deployed and nothing breaks when Microsoft updates SharePoint, and you can edit or remove it anytime. That is why LookBook 365 treats it as out-of-the-box and low risk.

Can I change the seven-day window?

Yes. The window is a single number in the JSON, so you can make it three days, fourteen days, or whatever fits how often your library changes. You can also base it on modified instead of created.

Can Greg build this for our library?

Yes – this is exactly the kind of work Greg Zelfond does. As an independent SharePoint consultant and Microsoft MVP, he designs out-of-the-box list and library formatting like this so your team can read and maintain it without a developer. Reach out through the contact page to talk about your library.