Adds an admin-alerts collection and a dashboard panel to the Payload admin so users can author messages and show them on the home page. Alerts can go to all authenticated users or selected users, and each user can dismiss them individually. It registers as a plugin and works with Payload 3 and a configurable users collection.
Dashboard system alerts for the Payload CMS admin UI — author messages, target audiences, allow per-user dismissals.
Installation
npm i payload-plugin-admin-alerts1
Stars
0
Forks
0
Open Issues
6 months ago
Last Updated
5
Weekly Downloads
v1.0.0
npm Version
130.7 KB
Unpacked Size
0
Dependencies
10 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 1 |
| Dec 5, 2026 | 1 |
| Dec 4, 2026 | 1 |
| Dec 3, 2026 | 1 |
| Dec 2, 2026 | 1 |
| Dec 1, 2026 | 1 |
| Nov 30, 2026 | 1 |
| Nov 29, 2026 | 1 |
| Nov 28, 2026 | 1 |
| Nov 27, 2026 | 1 |
| Nov 26, 2026 | 1 |
| Nov 25, 2026 | 1 |
| Nov 24, 2026 | 1 |
| Nov 23, 2026 | 1 |
| Nov 22, 2026 | 1 |
| Nov 21, 2026 | 1 |
| Nov 20, 2026 | 1 |
| Nov 19, 2026 | 1 |
| Nov 18, 2026 | 1 |
| Nov 17, 2026 | 1 |
| Nov 16, 2026 | 1 |
| Nov 15, 2026 | 1 |
| Nov 14, 2026 | 1 |
| Nov 13, 2026 | 1 |
| Nov 12, 2026 | 1 |
| Nov 11, 2026 | 1 |
| Nov 10, 2026 | 1 |
| Nov 9, 2026 | 1 |
| Nov 8, 2026 | 1 |
| Nov 7, 2026 | 1 |
| Nov 6, 2026 | 1 |
| Nov 5, 2026 | 1 |
| Nov 4, 2026 | 1 |
| Nov 3, 2026 | 1 |
| Nov 2, 2026 | 1 |
| Nov 1, 2026 | 1 |
| Oct 31, 2026 | 1 |
| Oct 30, 2026 | 1 |
| Oct 29, 2026 | 1 |
| Oct 28, 2026 | 1 |
| Oct 27, 2026 | 1 |
| Oct 26, 2026 | 1 |
| Oct 25, 2026 | 1 |
| Oct 24, 2026 | 1 |
| Oct 23, 2026 | 1 |
| Oct 22, 2026 | 1 |
| Oct 21, 2026 | 1 |
| Oct 20, 2026 | 1 |
| Oct 19, 2026 | 1 |
| Oct 18, 2026 | 1 |
| Oct 17, 2026 | 1 |
| Oct 16, 2026 | 1 |
| Oct 15, 2026 | 1 |
| Oct 14, 2026 | 1 |
| Oct 13, 2026 | 1 |
| Oct 12, 2026 | 1 |
| Oct 11, 2026 | 1 |
| Oct 10, 2026 | 1 |
| Oct 9, 2026 | 1 |
| Oct 8, 2026 | 1 |
| Oct 7, 2026 | 1 |
| Oct 6, 2026 | 1 |
| Oct 5, 2026 | 1 |
| Oct 4, 2026 | 1 |
| Oct 3, 2026 | 1 |
| Oct 2, 2026 | 1 |
| Oct 1, 2026 | 1 |
| Sep 30, 2026 | 1 |
| Sep 29, 2026 | 1 |
| Sep 28, 2026 | 1 |
| Sep 27, 2026 | 1 |
| Sep 26, 2026 | 1 |
| Sep 25, 2026 | 1 |
| Sep 24, 2026 | 1 |
| Sep 23, 2026 | 1 |
| Sep 22, 2026 | 1 |
| Sep 21, 2026 | 1 |
| Sep 20, 2026 | 1 |
| Sep 19, 2026 | 1 |
| Sep 18, 2026 | 1 |
| Sep 17, 2026 | 1 |
| Sep 16, 2026 | 1 |
| Sep 15, 2026 | 1 |
| Sep 14, 2026 | 1 |
| Sep 13, 2026 | 1 |
| Sep 12, 2026 | 1 |
| Sep 11, 2026 | 1 |
| Sep 10, 2026 | 1 |
| Sep 9, 2026 | 1 |
| Sep 8, 2026 | 1 |
| Sep 7, 2026 | 1 |
6−15 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 6 |
| Dec 5, 2026 | 8 |
| Dec 4, 2026 | 9 |
| Dec 3, 2026 | 8 |
| Dec 2, 2026 | 7 |
| Dec 1, 2026 | 10 |
| Nov 30, 2026 | 10 |
| Nov 29, 2026 | 9 |
| Nov 28, 2026 | 5 |
| Nov 27, 2026 | 4 |
| Nov 26, 2026 | 6 |
| Nov 25, 2026 | 6 |
| Nov 24, 2026 | 3 |
| Nov 23, 2026 | 3 |
| Nov 22, 2026 | 5 |
| Nov 21, 2026 | 5 |
| Nov 20, 2026 | 6 |
| Nov 19, 2026 | 8 |
| Nov 18, 2026 | 11 |
| Nov 17, 2026 | 13 |
| Nov 16, 2026 | 16 |
| Nov 15, 2026 | 19 |
| Nov 14, 2026 | 20 |
| Nov 13, 2026 | 23 |
| Nov 12, 2026 | 22 |
| Nov 11, 2026 | 21 |
| Nov 10, 2026 | 20 |
| Nov 9, 2026 | 19 |
| Nov 8, 2026 | 20 |
| Nov 7, 2026 | 30 |
| Nov 6, 2026 | 27 |
| Nov 5, 2026 | 27 |
| Nov 4, 2026 | 28 |
| Nov 3, 2026 | 29 |
| Nov 2, 2026 | 34 |
| Nov 1, 2026 | 32 |
| Oct 31, 2026 | 24 |
| Oct 30, 2026 | 27 |
| Oct 29, 2026 | 24 |
| Oct 28, 2026 | 21 |
| Oct 27, 2026 | 29 |
| Oct 26, 2026 | 26 |
| Oct 25, 2026 | 25 |
| Oct 24, 2026 | 28 |
| Oct 23, 2026 | 23 |
| Oct 22, 2026 | 30 |
| Oct 21, 2026 | 33 |
| Oct 20, 2026 | 28 |
| Oct 19, 2026 | 28 |
| Oct 18, 2026 | 30 |
| Oct 17, 2026 | 29 |
| Oct 16, 2026 | 32 |
| Oct 15, 2026 | 28 |
| Oct 14, 2026 | 28 |
| Oct 13, 2026 | 23 |
| Oct 12, 2026 | 22 |
| Oct 11, 2026 | 20 |
| Oct 10, 2026 | 18 |
| Oct 9, 2026 | 19 |
| Oct 8, 2026 | 24 |
| Oct 7, 2026 | 25 |
| Oct 6, 2026 | 26 |
| Oct 5, 2026 | 27 |
| Oct 4, 2026 | 28 |
| Oct 3, 2026 | 28 |
| Oct 2, 2026 | 35 |
| Oct 1, 2026 | 42 |
| Sep 30, 2026 | 42 |
| Sep 29, 2026 | 44 |
| Sep 28, 2026 | 43 |
| Sep 27, 2026 | 49 |
| Sep 26, 2026 | 52 |
| Sep 25, 2026 | 44 |
| Sep 24, 2026 | 31 |
| Sep 23, 2026 | 30 |
| Sep 22, 2026 | 31 |
| Sep 21, 2026 | 31 |
| Sep 20, 2026 | 27 |
| Sep 19, 2026 | 26 |
| Sep 18, 2026 | 25 |
| Sep 17, 2026 | 27 |
| Sep 16, 2026 | 27 |
| Sep 15, 2026 | 25 |
| Sep 14, 2026 | 26 |
| Sep 13, 2026 | 24 |
| Sep 12, 2026 | 21 |
| Sep 11, 2026 | 23 |
| Sep 10, 2026 | 21 |
| Sep 9, 2026 | 21 |
| Sep 8, 2026 | 20 |
| Sep 7, 2026 | 21 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1243726777-root)<a href="https://payloaddirectory.dev/plugins/1243726777-root"><img src="https://payloaddirectory.dev/badge/1243726777-root.svg" alt="Payload Directory"></a>README
Dashboard system alerts for the Payload CMS admin UI. Author messages from the admin panel, target an audience (everyone or specific users), and let users dismiss them individually.
admin-alerts collection for authoring messages (title, content, type, audience, dismissable flag)dismissedBy relationship field — no extra collectioninfo, success, warning, errorPOST /admin-alerts/:id/dismiss)pnpm add payload-plugin-admin-alerts
# or: npm install payload-plugin-admin-alerts
# or: yarn add payload-plugin-admin-alerts
Peer requirements: payload ^3.0.0, @payloadcms/ui ^3.0.0, react ^18 || ^19, react-dom ^18 || ^19.
Add the plugin to your payload.config.ts:
import { buildConfig } from 'payload'
import { payloadAdminAlerts } from 'payload-plugin-admin-alerts'
export default buildConfig({
plugins: [
payloadAdminAlerts({
// defaults shown
disabled: false,
usersCollectionSlug: 'users',
}),
],
// ...
})
That's it. After Payload restarts you'll see a System → Admin Alerts entry in the admin nav and a new alerts panel on the dashboard.
type PayloadAdminAlertsConfig = {
/**
* Disable the runtime behavior (dashboard UI + endpoints) while keeping
* the collections registered, so the database schema stays consistent.
* @default false
*/
disabled?: boolean
/**
* Auth collection slug used for alert authors and audience targeting.
* @default 'users'
*/
usersCollectionSlug?: string
}
| Option | Type | Default | Notes |
|---|---|---|---|
disabled | boolean | false | Skips registering the dashboard component and endpoints. Collections stay so migrations don't break. |
usersCollectionSlug | string | 'users' | Used by the createdBy and targetUsers relationship fields, and by access control checks. |
Alerts are a normal Payload collection (admin-alerts). Create them from any collection hook, job, or endpoint with the Local API — for example, notify editors when content goes live:
import type { CollectionAfterChangeHook, CollectionConfig } from 'payload'
const alertOnPublish: CollectionAfterChangeHook = async ({
doc,
operation,
previousDoc,
req,
context,
}) => {
// Only run once per publish, not on every save
if (context.skipAdminAlert) return
if (operation !== 'update') return
if (doc._status !== 'published' || previousDoc?._status === 'published') return
await req.payload.create({
collection: 'admin-alerts',
data: {
title: `Published: ${doc.title}`,
content: 'A new post is live. Review it from the dashboard if needed.',
type: 'success',
status: 'active',
audience: 'all',
dismissable: true,
},
req, // pass req so the alert stays in the same transaction
user: req.user, // createdBy is auto-set from the authenticated user
})
}
export const Posts: CollectionConfig = {
slug: 'posts',
versions: { drafts: true },
hooks: {
afterChange: [alertOnPublish],
},
fields: [
{ name: 'title', type: 'text', required: true },
// ...
],
}
Target a specific user (for example, the post author) instead of broadcasting:
await req.payload.create({
collection: 'admin-alerts',
data: {
title: 'Your draft was rejected',
content: 'An editor left feedback on your submission.',
type: 'warning',
status: 'active',
audience: 'selected',
targetUsers: [authorId],
dismissable: true,
},
req,
user: req.user,
})
Notes
req into nested create calls so the alert participates in the same database transaction as the triggering operation.user: req.user when the hook runs in an authenticated request; the plugin sets createdBy automatically on create.req.user, use overrideAccess: true and set createdBy yourself if you need an author for update/delete access.req.context flags (for example context.skipAdminAlert) if your hook chain could re-trigger itself.admin-alertsAuthored from the admin panel. Fields:
| Field | Type | Purpose |
|---|---|---|
title | text, required | Heading shown on the dashboard card |
content | textarea, required | Body text |
type | select | info / success / warning / error — drives the styling |
status | select | active / inactive — only active alerts are surfaced |
dismissable | checkbox | If true, users can dismiss the alert for themselves |
audience | select | all or selected |
targetUsers | relationship[] | Shown only when audience === 'selected' |
createdBy | relationship | Auto-populated on create, read-only |
dismissedBy | relationship[] | Users who have dismissed this alert; edit to re-show or pre-dismiss for specific users |
alertPreview | ui field | Live preview of how the alert will render on the dashboard |
Dismissals live on the alert itself as the dismissedBy relationship array — no separate collection. POST /admin-alerts/:id/dismiss appends the requesting user to the field; the dashboard query filters out alerts where the current user appears in dismissedBy. To re-show an alert to a specific user, remove them from dismissedBy. To re-broadcast to everyone who'd dismissed it, clear the field.
The plugin registers two endpoints (mounted under your Payload API route, typically /api):
| Method | Path | Description |
|---|---|---|
| GET | /admin-alerts/dashboard | Returns { alerts: DashboardAlert[] } for the current user |
| POST | /admin-alerts/:id/dismiss | Records a dismissal for the current user |
Both require an authenticated request.
createdBy)Dismissals are write-only and scoped to the requesting user.
pnpm install
pnpm dev # starts the dev/ Payload app on http://localhost:3000
pnpm test:unit # vitest unit tests
pnpm test:e2e # playwright e2e tests
pnpm check # typecheck + lint + tests
The dev/ directory contains a minimal Payload app preconfigured with the plugin.
pnpm publish
prepublishOnly cleans dist/ and rebuilds. publishConfig swaps the source-pointing exports for the compiled dist/ outputs at publish time, so consumers always get the built files.
MIT
This plugin was tested and developed in relation to my upcoming fairytale builder app.

payload plugin widgets
Dashboard widgets for KPI figures, lists and charts that read from your Payload collections
77536/wk2v3 v4
payload theme
shadcn-style redesign of the Payload admin with dashboard, command palette, dark mode and live theme customizer
751.8k/wk36v3
payload solid admin bar
WordPress-style admin bar shown in the Payload admin and on the Next.js website for logged-in editors
6596/wk0v3
reset list view
Adds a Reset Preferences button to collection list views to restore default columns, filters and pagination
57314/wk183v3
payload lineage
Admin pages that show a lineage graph and an ERD of your collections, globals, blocks and their linking fields
5472/wk0v3
payload iframe tabs plugin
Add iframe tabs to collection and global edit views in the Payload admin panel
4212/wk25v2