m-grgic

payload plugin widgets

by m-grgic
Admin customization
v3
v4
^3.90.0 || ^4.0.0-0
MIT

Overview

Summary generated from the README

Adds a modular dashboard to the Payload admin with Figure, List and Chart widgets that read from any collection. Editors can set widgets up in a drawer in edit mode, or developers can predefine them in the plugin config with typed helpers. Reads run as the signed-in user so access control applies. Requires Payload 3.90 or later (or the 4.0 beta), React 19 and the import map regenerated.

Features

  • Figure, list and chart widgets built from collection fields with no source declarations
  • Editors add and configure widgets in a drawer, using the admin's filter builder
  • Config helpers figure, list and chart with typed collection and field names checked at build
  • Charts without a chart library: bars, columns, lines, areas and donuts, with an accessible table
  • Sums and charts run as one query on Postgres, with limits for other adapters
  • Dashboard-wide period, CSV download, widget sharing and light and dark theme support

Use cases

  • Show open tasks, overdue items and monthly sales totals on the admin dashboard
  • Let editors build their own filtered widgets without developer changes
  • Place collection-based figures and charts on custom admin pages

From the author

Payload CMS plugin for dashboard widgets: KPI figures, lists and charts that read from your collections, set up in the config or by whoever is looking.

Installation

npm i payload-plugin-widgets

2

Stars

0

Forks

0

Open Issues

Yesterday

Last Updated

536

Weekly Downloads

v0.7.1

npm Version

671.3 KB

Unpacked Size

0

Dependencies

GitHub stars

2+2 since Oct 11

Show data
GitHub stars by day (UTC)
DateStars
Dec 6, 20262
Dec 5, 20262
Dec 4, 20262
Dec 3, 20262
Dec 2, 20262
Dec 1, 20262
Nov 30, 20262
Nov 29, 20262
Nov 28, 20262
Nov 27, 20262
Nov 26, 20262
Nov 25, 20262
Nov 24, 20262
Nov 23, 20262
Nov 22, 20262
Nov 21, 20262
Nov 20, 20262
Nov 19, 20262
Nov 18, 20262
Nov 17, 20262
Nov 16, 20262
Nov 15, 20262
Nov 14, 20262
Nov 13, 20262
Nov 12, 20262
Nov 11, 20262
Nov 10, 20262
Nov 9, 20262
Nov 8, 20262
Nov 7, 20262
Nov 6, 20262
Nov 5, 20262
Nov 4, 20262
Nov 3, 20262
Nov 2, 20262
Nov 1, 20262
Oct 31, 20262
Oct 30, 20262
Oct 29, 20262
Oct 28, 20262
Oct 27, 20262
Oct 26, 20262
Oct 25, 20262
Oct 24, 20262
Oct 23, 20262
Oct 22, 20262
Oct 21, 20262
Oct 20, 20262
Oct 19, 20262
Oct 18, 20262
Oct 17, 20262
Oct 16, 20262
Oct 15, 20262
Oct 14, 20261
Oct 13, 20261
Oct 12, 20260
Oct 11, 20260
npm weekly downloads

410−11 since Oct 15

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 6, 2026410
Dec 5, 2026397
Dec 4, 2026437
Dec 3, 2026487
Dec 2, 2026577
Dec 1, 2026986
Nov 30, 20261,105
Nov 29, 20261,226
Nov 28, 20261,127
Nov 27, 20261,223
Nov 26, 20261,191
Nov 25, 20261,094
Nov 24, 2026698
Nov 23, 2026569
Nov 22, 2026402
Nov 21, 2026343
Nov 20, 2026205
Nov 19, 2026182
Nov 18, 2026162
Nov 17, 2026116
Nov 16, 202666
Nov 15, 202638
Nov 14, 202645
Nov 13, 202655
Nov 12, 202657
Nov 11, 202662
Nov 10, 202658
Nov 9, 202658
Nov 8, 202657
Nov 7, 202656
Nov 6, 202650
Nov 5, 202645
Nov 4, 202640
Nov 3, 202646
Nov 2, 202652
Nov 1, 202655
Oct 31, 202653
Oct 30, 202643
Oct 29, 202640
Oct 28, 202639
Oct 27, 202638
Oct 26, 202629
Oct 25, 202633
Oct 24, 202686
Oct 23, 202681
Oct 22, 2026284
Oct 21, 2026705
Oct 20, 2026700
Oct 19, 2026696
Oct 18, 2026684
Oct 17, 2026624
Oct 16, 2026624
Oct 15, 2026421

Each point is npm's rolling 7-day download count.

Health Score

77/100Excellent

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1416019911-root.svg)](https://payloaddirectory.dev/plugins/1416019911-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1416019911-root"><img src="https://payloaddirectory.dev/badge/1416019911-root.svg" alt="Payload Directory"></a>
Updated Dec 4, 2026Created Oct 12, 2026Published Dec 4, 2026

README

payload-plugin-widgets

npm version npm downloads CI Licence: MIT

A Payload CMS plugin for dashboard widgets that read from your collections: KPI figures, lists and charts. Add the plugin and every collection can be put on the admin dashboard. Whoever is signed in can set a widget up in a drawer, a project can put some there ready-made, and the same three can stand on any other page of the admin.

A Payload admin dashboard of KPI figures, charts and a list

Install

pnpm add payload-plugin-widgets   # or npm install, or yarn add
// payload.config.ts
import { buildConfig } from 'payload'
import { widgetsPlugin } from 'payload-plugin-widgets'

export default buildConfig({
  // …
  plugins: [widgetsPlugin()],
})

Then write the import map again, as after adding any plugin that brings components:

pnpm payload generate:importmap

That is all. There is no stylesheet to add and no route to mount. Put the plugin after the plugins that add collections.

Quick start

With nothing but widgetsPlugin(), open the dashboard and choose Edit Dashboard from the menu beside its name. Then add a "Figure", a "List" or a "Chart". Its drawer opens as it is added, with a preview of the widget and a few ready choices to start from; the pencil on a widget opens it again.

To have a dashboard that starts with something on it, here for collections tasks (with status and dueDate) and orders (with total), as in the demo:

import { chart, figure, list, widgetsPlugin } from 'payload-plugin-widgets'

widgetsPlugin({
  currency: 'EUR',
  timeZone: 'Europe/Zagreb',
  widgets: [
    figure('tasks', { label: 'Open tasks', where: { status: { not_equals: 'done' } } }),
    figure('tasks', { label: 'Overdue', where: { dueDate: { less_than: 'today' }, status: { not_equals: 'done' } } }),
    figure('orders', { label: 'Sold this month', measure: 'total', period: 'month', compare: 'previous' }),
    chart('orders', { label: 'Orders by month', measure: 'total', by: 'time', period: 'last12', as: 'columns' }),
    list('orders', { label: 'Latest orders', limit: 5 }),
  ],
})

The editor offers and checks the collection slugs and the field names in where, measure, by and date, from your payload-types.ts. The config checks them again as it is built.

What it does

  • Nothing to declare. Every collection is a source as its fields describe it: how many there are, a sum for each number, a group for each select, checkbox and relationship, and a list of the latest. Sources and measures
  • Set up by whoever is looking. A "Figure", a "List" and a "Chart" are added in the dashboard's edit mode and filtered with the admin's own filter builder. User widgets and access
  • Or by the config. figure(…), list(…) and chart(…) put widgets there ready-made. They are typed against your generated types, and checked as the config is built with a "did you mean" where a name is off. Configuration, where and dates, errors
  • Charts without a chart library. Bars, columns, lines, areas, donuts and shares of the whole, with several series, tooltips, a scale and a table for screen readers. Charts
  • A dashboard to work with. A period for the whole of it, lists as tables of the fields you choose, a tile read again or downloaded as CSV, and a widget somebody set up shared with the others. The starting layout, sharing
  • With whoever's access. Every read is made as the signed-in user, so access control always applies. access functions, written as Payload's own are, say who else a widget is not for. Who sees what
  • Added up by the database. On Postgres, sums and charts are one query. Elsewhere they are read record by record, within limits you can set. Limits and performance
  • No script draws anything. The tiles are server components and plain CSS that follow the admin's theme, light and dark; the only scripts are their buttons. Theming
  • Yours to take apart. You can have the widgets on any page, the data without the tiles, views of your own, and widgets that are all your own. On any other page, drawing it your own way

Requirements

Payload3.90 or later (the modular dashboard), or the 4.0 beta
Next.jswhat your Payload supports; developed on 16.4
React19
Node20.9 or later
Databaseany Payload adapter

Payload 4 is in beta, and so is the support for it here: the same code is type-checked and tested on 4.0.0-beta.11, which wants Node 24 and Next.js 16.4.5 or later, and the tiles fall back to its colours. A later beta may change what this relies on.

Developed with Payload 3.90.2, Next.js 16 and React 19.3 on Postgres. The tests run on Payload 3.90.0 and the latest 3.x, on Next.js 15.4 and 16, and on Node 22 and 24.

More

Licence

MIT © Matija Grgić

Similar plugins