Adds a dark admin bar across the top of every Payload admin screen and, for logged-in editors, across the website. It offers a site link, View or Edit for the current document, a New menu limited to collections the user may create, exit preview, and log out. It is configured through a plugin plus a website component, and requires Payload 3 and React 19.
A WordPress-style admin bar for Payload CMS, the same in the admin and on the website: visit site, edit or view the current document, create new documents, exit preview and log out
Installation
npm i @rocksoliddigital/payload-solid-admin-bar0
Stars
0
Forks
1
Open Issues
1 weeks ago
Last Updated
96
Weekly Downloads
v0.3.0
npm Version
45.6 KB
Unpacked Size
0
Dependencies
00 since Nov 22
| Date | Stars |
|---|---|
| Dec 6, 2026 | 0 |
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
179+179 since Nov 25
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 179 |
| Dec 5, 2026 | 392 |
| Dec 4, 2026 | 429 |
| Dec 3, 2026 | 872 |
| Dec 2, 2026 | 864 |
| Dec 1, 2026 | 854 |
| Nov 30, 2026 | 832 |
| Nov 29, 2026 | 742 |
| Nov 28, 2026 | 507 |
| Nov 27, 2026 | 453 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
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/1469557557-payload-solid-admin-bar)<a href="https://payloaddirectory.dev/plugins/1469557557-payload-solid-admin-bar"><img src="https://payloaddirectory.dev/badge/1469557557-payload-solid-admin-bar.svg" alt="Payload Directory"></a>README
A WordPress-style admin bar for Payload CMS. The same dark strip shows across the top of every admin screen and, for logged-in editors, across the top of the website:
| In the admin | On the website | |
|---|---|---|
| Site | Site name → the website (new tab) | Site name → the admin dashboard |
| Current | View page on a published document's screen | Edit page for the document shown |
| Create | + New → the collections the user may create | same |
| Preview | — | Exit preview in draft mode |
| User | Email → account, Log out | same |
Payload's own @payloadcms/admin-bar covers only the website side, for one collection.
A small Payload + Next.js site shows it in the admin, on the website and in Live Preview: see the repo.
pnpm add @rocksoliddigital/payload-solid-admin-bar
It needs Payload 3 and React 19.
// payload.config.ts
import { adminBarPlugin } from '@rocksoliddigital/payload-solid-admin-bar/plugin';
plugins: [
adminBarPlugin({
siteName: 'Example',
// Leave siteURL out when the site and the admin share an origin; set it, or
// ({ req, payload }) => tenant domain, when the website lives elsewhere
collections: {
pages: { path: ({ doc }) => (doc.slug === 'home' ? '/' : `/${doc.slug}`) },
posts: { path: ({ doc }) => `/posts/${doc.slug}` },
categories: { create: false },
},
}),
];
Then run payload generate:importmap, and import the stylesheet in
app/(payload)/layout.tsx. The bar goes in admin.components.header, so it sits above
Payload's own header and scrolls away with it (Payload has many position: sticky elements that a
fixed bar would cover).
path and the document
is published. The document is read as the logged-in user (overrideAccess: false).collections, minus create: false and those the user may
not create.serverURL.// a client wrapper in the site's layout, so it can pass onPreviewExit
'use client';
import { AdminBar } from '@rocksoliddigital/payload-solid-admin-bar/site';
<AdminBar
siteName="Example"
collections={{ pages: { label: 'Page' }, posts: { label: 'Post' } }}
preview={draftModeEnabled}
onPreviewExit={() => fetch('/next/exit-preview').then(() => router.refresh())}
/>;
// the site's root layout, once
import '@rocksoliddigital/payload-solid-admin-bar/styles.css';
// in each page: which document it shows, for the Edit link
import { AdminBarDocument } from '@rocksoliddigital/payload-solid-admin-bar/site';
<AdminBarDocument collection="pages" id={page.id} />;
The bar asks the CMS who is logged in (/api/<users>/me, then /api/access) from the browser, so
pages stay static and visitors get nothing. For a CMS on another origin, pass cmsURL and allow
the site in Payload's cors and csrf. Custom routes: admin, api, account, logout,
userCollection.
Live Preview: inside a frame, such as the admin's Live Preview pane, the bar renders nothing
and makes no requests, since the admin around it already has one. Pass showInFrames to show it
anyway.
With Payload's multi-tenant plugin, the bar names the tenant on screen (a location, a brand, a site) and keeps "+ New" in it.
// payload.config.ts
adminBarPlugin<Location>({
siteName: 'Example',
collections: {
// `tenant` is the document's tenant, read once by the bar
pages: { path: ({ doc, tenant }) => `/${tenant?.slug}/${doc.slug}` },
},
tenants: {
collection: 'locations', // the plugin's tenantsSlug
path: ({ tenant }) => `/${tenant.slug}`, // its home page; leave out for no link
},
});
In the admin, the bar shows the document's tenant on its edit screen, and the tenant
selected in the admin elsewhere, linking to its home page. Its name is the tenants collection's
useAsTitle field, or tenants.label(tenant). Options: field (the tenant field, default
tenant) and cookie (the selected tenant's cookie, default payload-tenant). path can return
a full URL when each tenant has its own domain.
On the website, tell the bar the page's tenant:
<AdminBarDocument
collection="pages"
id={page.id}
tenant={{ id: location.id, label: location.name, href: `/${location.slug}` }}
/>
The bar shows its name, and "+ New" sets the multi-tenant plugin's cookie to it, so a page
created from a location's website starts in that location, whatever was selected in the admin.
That needs the CMS on the site's origin; tenantCookie names the cookie, or false leaves it
alone. A page without an AdminBarDocument (a listing, say) shows no tenant.
Tenants on their own domains with one CMS: the website bar asks the CMS who is logged in from
the tenant's domain. Browsers send Payload's login cookie (SameSite=Lax) only between sites on
the same registrable domain (cms.example.com and harbour.example.com), so on separate domains
the website bar can't see the login and stays hidden. The admin bar works either way.
Import the stylesheet once in each root layout that shows the bar: the website's and Payload's
app/(payload)/layout.tsx.
import '@rocksoliddigital/payload-solid-admin-bar/styles.css';
The components don't import it themselves, so they also load in plain Node (integration tests,
scripts). Override the custom properties on .solid-admin-bar
(--solid-admin-bar-bg, -fg, -hover-bg, -accent, -height). Bar (from /site) is the
markup alone, for stories and custom wrappers.
payload plugin presets
Save and apply reusable block configurations as presets from the Payload admin blocks drawer
786.7k/wk37v3
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 plugin visual editing
Click-to-edit overlays on your frontend that focus the matching field in the Payload admin
741.4k/wk37v3
theme management
Theme presets, live preview and WCAG audit for editing site appearance from the Payload admin
73130/wk9v3
payload plugin stacked editing
Stacked, breadcrumb-navigated editing panels for nested blocks and arrays in the Payload admin
71250/wk37v3