Opens array and blocks rows in drawers layered on top of each other, with breadcrumbs to jump between levels at any depth. It uses Payload's own drawers, fields and form state, so validation, permissions, drafts and live preview keep working. It also adds preview cards to row headers. Added through a plugin entry, it requires Payload 3.90 or later and React 19, and the import map must be regenerated.
Stacked, breadcrumb-navigated editing panels for nested Payload CMS blocks and arrays, built on Payload's own drawers and fields
Installation
npm i @focus-reactive/payload-plugin-stacked-editing37
Stars
5
Forks
33
Open Issues
Today
Last Updated
249
Weekly Downloads
v2.0.0
npm Version
327.8 KB
Unpacked Size
0
Dependencies
37+22 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 37 |
| Dec 4, 2026 | 37 |
| Dec 3, 2026 | 37 |
| Dec 2, 2026 | 37 |
| Dec 1, 2026 | 36 |
| Nov 30, 2026 | 35 |
| Nov 29, 2026 | 35 |
| Nov 28, 2026 | 34 |
| Nov 27, 2026 | 34 |
| Nov 26, 2026 | 34 |
| Nov 25, 2026 | 34 |
| Nov 24, 2026 | 34 |
| Nov 23, 2026 | 34 |
| Nov 22, 2026 | 34 |
| Nov 21, 2026 | 34 |
| Nov 20, 2026 | 33 |
| Nov 19, 2026 | 32 |
| Nov 18, 2026 | 32 |
| Nov 17, 2026 | 32 |
| Nov 16, 2026 | 32 |
| Nov 15, 2026 | 32 |
| Nov 14, 2026 | 32 |
| Nov 13, 2026 | 32 |
| Nov 12, 2026 | 32 |
| Nov 11, 2026 | 32 |
| Nov 10, 2026 | 32 |
| Nov 9, 2026 | 31 |
| Nov 8, 2026 | 31 |
| Nov 7, 2026 | 31 |
| Nov 6, 2026 | 31 |
| Nov 5, 2026 | 31 |
| Nov 4, 2026 | 30 |
| Nov 3, 2026 | 30 |
| Nov 2, 2026 | 30 |
| Nov 1, 2026 | 30 |
| Oct 31, 2026 | 30 |
| Oct 30, 2026 | 30 |
| Oct 29, 2026 | 30 |
| Oct 28, 2026 | 30 |
| Oct 27, 2026 | 30 |
| Oct 26, 2026 | 30 |
| Oct 25, 2026 | 30 |
| Oct 24, 2026 | 29 |
| Oct 23, 2026 | 29 |
| Oct 22, 2026 | 29 |
| Oct 21, 2026 | 29 |
| Oct 20, 2026 | 29 |
| Oct 19, 2026 | 29 |
| Oct 18, 2026 | 29 |
| Oct 17, 2026 | 27 |
| Oct 16, 2026 | 26 |
| Oct 15, 2026 | 26 |
| Oct 14, 2026 | 26 |
| Oct 13, 2026 | 25 |
| Oct 12, 2026 | 25 |
| Oct 11, 2026 | 25 |
| Oct 10, 2026 | 25 |
| Oct 9, 2026 | 25 |
| Oct 8, 2026 | 25 |
| Oct 7, 2026 | 25 |
| Oct 6, 2026 | 24 |
| Oct 5, 2026 | 24 |
| Oct 4, 2026 | 24 |
| Oct 3, 2026 | 23 |
| Oct 2, 2026 | 22 |
| Oct 1, 2026 | 22 |
| Sep 30, 2026 | 20 |
| Sep 29, 2026 | 20 |
| Sep 28, 2026 | 20 |
| Sep 27, 2026 | 20 |
| Sep 26, 2026 | 19 |
| Sep 25, 2026 | 18 |
| Sep 24, 2026 | 18 |
| Sep 23, 2026 | 18 |
| Sep 22, 2026 | 18 |
| Sep 21, 2026 | 18 |
| Sep 20, 2026 | 18 |
| Sep 19, 2026 | 18 |
| Sep 18, 2026 | 18 |
| Sep 17, 2026 | 18 |
| Sep 16, 2026 | 18 |
| Sep 15, 2026 | 18 |
| Sep 14, 2026 | 18 |
| Sep 13, 2026 | 17 |
| Sep 12, 2026 | 17 |
| Sep 11, 2026 | 17 |
| Sep 10, 2026 | 16 |
| Sep 9, 2026 | 16 |
| Sep 8, 2026 | 16 |
| Sep 7, 2026 | 15 |
| Sep 6, 2026 | 15 |
Shared by 15 plugins in focusreactive/payload-plugins.
244+244 since Nov 19
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 244 |
| Dec 4, 2026 | 246 |
| Dec 3, 2026 | 264 |
| Dec 2, 2026 | 238 |
| Dec 1, 2026 | 226 |
| Nov 30, 2026 | 225 |
| Nov 29, 2026 | 69 |
| Nov 28, 2026 | 103 |
| Nov 27, 2026 | 488 |
| Nov 26, 2026 | 464 |
| Nov 25, 2026 | 464 |
| Nov 24, 2026 | 461 |
| Nov 23, 2026 | 449 |
| Nov 22, 2026 | 438 |
| Nov 21, 2026 | 396 |
| Nov 20, 2026 | 0 |
| Nov 19, 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/1177993877-payload-plugin-stacked-editing)<a href="https://payloaddirectory.dev/plugins/1177993877-payload-plugin-stacked-editing"><img src="https://payloaddirectory.dev/badge/1177993877-payload-plugin-stacked-editing.svg" alt="Payload Directory"></a>README
Sanity/Storyblok-style navigation for nested content in the Payload admin. Clicking an array or blocks row opens it in a panel layered on top of the previous one, with breadcrumbs at the top to jump between levels. Page-builder blocks, arrays, blocks inside arrays and blocks inside blocks all work the same way, at any depth.
Deep nest sample / Layout / Deep Nest 01 / Items / Item one label / Callouts / Callout 01
Payload shows nested rows as inline collapsibles. Three levels down, an editor is scrolling through a long accordion and has lost track of where they are. This plugin keeps Payload's own fields, validation, permissions, drawers and styling. It changes only one thing: where a row's fields are shown.
npm install @focus-reactive/payload-plugin-stacked-editing
yarn add @focus-reactive/payload-plugin-stacked-editing
pnpm add @focus-reactive/payload-plugin-stacked-editing
bun add @focus-reactive/payload-plugin-stacked-editing
// payload.config.ts
import { stackedEditing } from "@focus-reactive/payload-plugin-stacked-editing";
export default buildConfig({
plugins: [
stackedEditing(), // every collection and global
// or: stackedEditing({ collections: ["pages"], globals: [] })
],
});
Then regenerate the import map: payload generate:importmap.
Peer dependencies: payload and @payloadcms/ui ^3.90.0, react ^19.
| Option | Type | Default | Description |
|---|---|---|---|
collections | string[] | all collections | Collection slugs that get stacked editing. |
globals | string[] | all globals | Global slugs that get stacked editing. |
enabled | boolean | true | false leaves the config untouched (inline rows). |
defaultMode | "panel" | "inline" | "panel" | How rows behave (see below). |
cards | boolean | true | Row preview cards in row headers (see Row preview cards). |
defaultMode: "panel" (default): every array/blocks row, in the document and in each panel,
starts as a collapsed card, rows added later included. A click on the card's header opens it in
a panel. The chevron on the right still expands it inline, as in plain Payload. Collapsing is
done in form state only: it writes no preferences, changes no data and does not mark the document
modified. Rows the editor expands themselves (chevron, "Show All") stay expanded. Rows that Payload
expands again after a save are collapsed back into cards.
To avoid a flash of expanded rows before the admin hydrates, panel mode also sets Payload's own
admin.initCollapsed: true on every array and blocks field that doesn't set it, so the server
already renders rows collapsed. An explicit initCollapsed on a field is kept. Payload still
prefers an editor's saved collapse preferences over initCollapsed; the client-side collapse covers
that case.
defaultMode: "inline": rows behave as in plain Payload: they keep their saved expanded or
collapsed state and a header click toggles inline. A row opens in a panel only through the "open
in panel" icon in its header, shown faintly next to the … menu.
Document / Field / Row / Field / Row …. A row crumb goes back to that
row's panel. A field crumb goes back to the panel that contains the field. The document crumb
closes every panel. The trail always stays on one line. When it is too wide for the panel, the
middle folds into a … button: Document / … / parent / current, or Document / … / current
in a very narrow panel. If even that does not fit, the current crumb is cut with an ellipsis and
shows its full text on hover. Hovering the … button (or clicking it, or pressing Enter on it)
opens a menu of the hidden levels, indented by depth and labelled with their type (Blocks,
Array, or the block or item label). Escape closes the menu without closing the panel. The fold
follows the measured width of the real labels, not a fixed number of levels.… menu, drag handle, block name input) work as before.… menu use the title of the row's preview card (see below),
next to Payload's own row label, for example Hero 01.Rows show as Sanity-style cards instead of Item 01 / Untitled: a 34px thumbnail, a title and a
muted subtitle, all updated live from the form. The plugin sets its CardLabel as the
admin.components.RowLabel of every managed array field and the admin.components.Label of every
managed block (including config-level blocks used through blockReferences). It never replaces
a label you set yourself. Turn the cards off with stackedEditing({ cards: false }).
Configure a card on the block, or on the array field, with admin.custom.preview. This is plain
data, so it reaches the admin through the client config:
import { definePreview } from '@focus-reactive/payload-plugin-stacked-editing'
const Features: Block = {
slug: 'features',
fields: [
{
name: 'items',
type: 'array',
admin: {
custom: {
preview: definePreview({ title: 'title', subtitle: 'points.length', media: 'image' }),
},
},
fields: [/* title, image, points … */],
},
],
}
const Hero: Block = {
slug: 'hero',
admin: { custom: { preview: definePreview({ subtitle: 'description' }) } },
fields: [/* … */],
}
select paths are relative to the row. Dot paths reach into groups (cta.label). A path ending in
.length counts the rows of an array or blocks field and uses its labels (2 Points). Select
fields show their option label, dates are formatted, and rich text shows its first paragraph.
Without a config, or when a selected value is empty:
| Part | Default |
|---|---|
| title | the block's blockName if the editor set one; else the first text, textarea, email, select or radio field with a value at the row's own level (rows, collapsibles, unnamed groups and unnamed tabs are seen through); else the first paragraph of a rich text field; else Payload's label (Hero 01) |
| subtitle | the block label or the array's item label |
| media | the first upload field into an upload collection; else the block's imageURL; else a neutral icon |
Uploads given as an id are resolved once per page through the REST API
(/api/<collection>/<id>?depth=0). The card shows sizes.thumbnail when the collection has that
size, and the file itself otherwise. Files that are not images get the icon.
A custom label can show the same card: render CardLabel from
@focus-reactive/payload-plugin-stacked-editing/client inside it. It reads Payload's row label
context.
Plugin order. Put stackedEditing before plugins that wrap existing block labels
(@focus-reactive/payload-plugin-presets does this). Those plugins then keep the card and add their
own actions next to it.
The plugin makes no schema changes. It adds no fields, hooks or endpoints.
StackedEditing, to each selected
collection's admin.components.edit.beforeDocumentControls (elements.beforeDocumentControls
for globals). That slot renders inside the document's <Form>, which the rest of the design
depends on.button.collapsible__toggle of a
.blocks-field__row / .array-field__row. That button is the header's click surface. Actions,
the drag handle and the block name input sit above it, so they never reach it. The listener
resolves the row's data path from Payload's DOM. The field path comes from the field wrapper id
(field-layout__0__items), and the index comes from the row container id
(layout-0-items-row-2). The two ids are cross-checked, because the row id alone is ambiguous
for names that contain dashes. The listener then stops the inline toggle. Clicks are only
handled for the plugin's own form and panels, so document drawers opened from a panel keep their
own instance.resolveRowChain walks the client collection/global config the way RenderFields
renders it. It uses Payload's own getFieldPaths and getFieldPermissions. It sees through
row, collapsible, unnamed groups and unnamed tabs, and descends into named groups and tabs.
It resolves blocks rows by the row's blockType from form state, including blockReferences
and config-level blocks (config.blocksMap). Each level yields the fields, schemaPath and
permissions that Payload's BlockRow / ArrayRow would pass. Missing permissions fall back to
true.Drawer per level, each rendered inside the previous one, so Payload's
DrawerDepthProvider offsets and narrows every new drawer. Each drawer body renders the row
with Payload's RenderFields (parentPath = rowPath, parentIndexPath = "",
parentSchemaPath, permissions, readOnly), as BlockRow does. React context passes through
the portal, so the fields stay bound to the document's form. There is no second form and no data
copy. Save, autosave, drafts, validation and live preview work as usual.When Live Preview is open beside the editor (useLivePreviewContext(): previewing, iframe mode),
the panels stay in the editor column. They run from the column's left edge to the preview's left
edge, start below the document controls, and get a smaller --gutter-h, so each level is offset by
about one --base instead of a full gutter. The modal container stops catching pointer events, so
the preview can still be scrolled and clicked. The column is measured from Payload's DOM
(.collection-edit__main / .global-edit__main, .live-preview-window) and measured again on
resize and scroll. It is published as CSS variables on <html>.
The panels' fields belong to the document form, so Live Preview's form-state subscription sends every keystroke typed in a panel to the preview. This works at any depth. With the preview closed, or in popup mode, the panels are the usual full-height drawers.
The plugin works with @focus-reactive/payload-plugin-visual-editing without either package
depending on the other. When the editor clicks an element in the preview, the visual-editing
bridge dispatches a cancelable payload:open-field event on window, with
detail: { path, collectionSlug | globalSlug, docId?, locale? }.
If the event is about the document this edit view has open and the path lies inside an array or
blocks row (for example sections.2.items.0.points.1.text), stacked editing cancels the event,
opens one panel per row on the way down, scrolls to the field in the top panel, focuses it and
flashes a highlight ring. A later click replaces the open stack with the new chain; levels both
chains share stay mounted, so they do not flicker. For a top-level field the plugin closes its
panels and leaves the event alone, so the bridge focuses the field inline as before.
Payload keeps collapsed rows mounted, so while a panel is open its fields also exist (hidden) in the inline row, and in a parent panel. The plugin handles that as follows:
initialValue
of every rich text under that row that changed at its current value. That is Lexical's own
remount trigger. The pass runs again after Lexical's idle write window (about 0.5 s). value
(what gets saved) is never touched, and the form is not marked modified.<label for> in a panel would focus the hidden twin. The plugin
redirects those clicks to the panel's own input.document.getElementById finds the hidden inline copy first.collapsible__toggle,
blocks-field__row, array-field__row, field-…, …-row-N). A Payload release that changes
them disables the plugin: clicks fall through to the inline behaviour. It does not break editing.BlocksFeature) are not opened in panels.blockName input. A
block name you set still shows as the card's title, but it can no longer be edited from the
header. A custom label that needs it can render Payload's SectionTitle next to CardLabel.panel mode). It does not open in a panel by
itself..collapsible__actions-wrap.The plugin only changes how the admin shows array and blocks rows.
It registers no endpoints, hooks, jobs or collections, makes no Local API calls and takes no access option, so it needs no entry in an access policy.
Every read and write still goes through Payload's own form and REST API with the editor's session, so the project's access rules apply unchanged.
A row card's thumbnail is read from GET /api/<collection>/<id> with the editor's session, so an editor who may not read that upload sees no thumbnail.
Version 2.0 raises the payload and @payloadcms/ui peer dependencies to ^3.90.0, and react to the versions Payload 3.90 requires (^19.0.1).
The other plugins of this repository moved onto @focus-reactive/payload-plugin-guard, which relies on the access behaviour of Payload 3.90, and this one follows so a project upgrades them together; Upgrading to the guard describes that upgrade.
payload and every @payloadcms/* package to 3.90 or later.access option and needs no entry in the access policy.bun run build # swc + d.ts
bun run test # vitest: DOM path parsing, schema walking, breadcrumbs, editor re-sync
bun run check-types
bun run lint
apps/cms uses the plugin on page and posts.
Topics
Tags
payload plugin presets
Save and apply reusable block configurations as presets from the Payload admin blocks drawer
786.7k/wk37v3
payload plugin visual editing
Click-to-edit overlays on your frontend that focus the matching field in the Payload admin
741.4k/wk37v3
payload plugin json form builder
Edit a Payload json field as real admin fields, with the form shape built in the admin panel
72441/wk37v3
blockwright
Visual drag-and-drop page and theme builder for Payload CMS with widgets, forms, menus and templates
6022/wk3v3
payload plugin scheduling
Schedule future publication of drafts on collections and globals with a secured cron endpoint
77783/wk37v3
payload plugin comments
Document-level and field-level comments with mentions, resolution and email notifications for Payload admin
757.0k/wk37v3