ExtantApe

payload plugin menu

by ExtantApe
Admin customization
v3
^3.80.0
MIT

Overview

Summary generated from the README

Adds a menus collection to Payload 3 where editors build navigation with drag-and-drop entries: links, dropdowns and section headings. A resolveMenu helper filters entries by visitor, fills in labels and hrefs, sorts alphabetically in the visitor's locale and removes empty groups. It only stores data, so the site supplies its own markup. Requires Payload 3.80 or later, @payloadcms/ui and React 19.

Features

  • Drag-and-drop entries with links, dropdowns and section headings
  • Optional icon or emoji on every entry, with control over top-level display
  • Alphabetical sorting per menu or dropdown in the visitor's language
  • Visibility per entry: everyone, signed in or out, or custom conditions
  • Link targets from named routes, collection documents or URLs, with unsafe URLs dropped
  • Works with the multi-tenant plugin for per-site menus

Use cases

  • Build a header navigation with grouped dropdowns that editors manage without code
  • Show different menu entries to staff, signed-in users and anonymous visitors
  • Give each tenant site in a multi-tenant setup its own navigation menus

From the author

Menus for Payload: drag-and-drop links, dropdowns and section headings, optional icons or emoji, alphabetical order in each visitor’s language, and visibility per entry.

Installation

npm i @extantape/payload-plugin-menu

0

Stars

0

Forks

0

Open Issues

1 weeks ago

Last Updated

126

Weekly Downloads

v0.1.1

npm Version

25.9 KB

Unpacked Size

0

Dependencies

GitHub stars

00 since Nov 1

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

139+139 since Nov 3

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 6, 2026139
Dec 5, 2026183
Dec 4, 2026351
Dec 3, 2026382
Dec 2, 2026406
Dec 1, 2026435
Nov 30, 2026477
Nov 29, 2026563
Nov 28, 2026540
Nov 27, 2026374
Nov 26, 2026349
Nov 25, 2026328
Nov 24, 2026295
Nov 23, 2026254
Nov 22, 2026351
Nov 21, 2026321
Nov 20, 2026310
Nov 19, 2026278
Nov 18, 2026256
Nov 17, 2026226
Nov 16, 2026211
Nov 15, 20260
Nov 14, 2026307
Nov 13, 2026288
Nov 12, 2026264
Nov 11, 2026361
Nov 10, 2026303
Nov 9, 2026291
Nov 8, 2026257
Nov 7, 2026233
Nov 6, 2026221
Nov 5, 2026166
Nov 4, 20260
Nov 3, 20260

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

Health Score

76/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/1443491321-root.svg)](https://payloaddirectory.dev/plugins/1443491321-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1443491321-root"><img src="https://payloaddirectory.dev/badge/1443491321-root.svg" alt="Payload Directory"></a>
Updated Nov 29, 2026Created Nov 2, 2026Published Nov 13, 2026

README

@extantape/payload-plugin-menu

Menus for Payload 3 that stay simple for editors:

  • Drag and drop entries (Payload arrays), with readable row labels.
  • Links, dropdowns and section headings. Headings group the entries of a dropdown (e.g. Animals, Commerce, Account) and don't link anywhere.
  • Optional icon or emoji on every entry: dropdowns, links and headings. Top-level icons can be hidden, shown, or shown on small screens only, in place of the label.
  • Alphabetical order for the whole menu, or per dropdown, within each section. Sorting happens when the menu is rendered, in the visitor's language, so translated labels sort correctly.
  • Who sees it: everyone, signed-in or signed-out people, plus conditions your site evaluates (e.g. "staff", "shop open").
  • Link targets: named pages of your app (routes), documents from your collections, or URLs. Only links a browser opens as a page are kept: paths on your site, # and ? links, and http, https, mailto and tel addresses. Anything else (javascript:, data:, //other-host) is dropped. With docHref, a document whose docHref gives no URL (an unpublished page, say) isn't shown.
  • Works with @payloadcms/plugin-multi-tenant: add the collection to its list and each site gets its own menus.
import { menuPlugin } from '@extantape/payload-plugin-menu'

plugins: [
  menuPlugin({
    routes: [
      { value: 'climate', label: 'Climate', href: '/climate' },
      { value: 'shop', label: 'Shop', href: '/shop', when: ['shopOpen'] },
    ],
    conditions: [{ value: 'staff', label: 'Staff' }],
    linkCollections: ['pages'],
    access: { create: isAdmin, update: isAdmin, delete: isAdmin },
  }),
]

Render it with resolveMenu(). It drops entries the visitor shouldn't see, fills in labels and hrefs, sorts where asked, and removes empty dropdowns and headings:

import { resolveMenu } from '@extantape/payload-plugin-menu'

const menu = await payload.find({ collection: 'menus', where: { location: { equals: 'header' } }, depth: 1 })
const resolved = resolveMenu(menu.docs[0], {
  locale: 'de',
  signedIn: Boolean(user),
  conditions: { staff: isStaff(user), shopOpen },
  routes, // the same list you gave the plugin
  routeLabel: (r) => t(`nav.${r.value}`), // optional: your translations
  docHref: (doc) => doc.path as string,
})

The plugin stores data and nothing more; markup is up to you. For accessible menus:

  • Use the disclosure pattern for dropdowns: a <button aria-expanded aria-controls> that shows a list. Escape closes it and returns focus to the button.
  • Wrap each section in role="group" with aria-labelledby pointing at its heading.
  • Mark icons and emoji aria-hidden="true". An entry shown only as an icon needs a visually hidden label.
  • Set aria-current="page" on the link to the current page.

On its own, and with others

On its own. Menu needs only Payload. Menus live in its own collection (menus), link targets come from your routes and collections, and your site renders the result of resolveMenu() with its own markup. It doesn't use any other plugin.

Needs. Payload ^3.80.0, @payloadcms/ui ^3.80.0 and React ^19.0.0 as peer dependencies. No other EXTANT APE plugin is required.

Works with:

  • Multi-tenant (@payloadcms/plugin-multi-tenant): add the menus collection to its list, and each site gets its own menus.

Color Theory. No direct link. Menu draws nothing on your site, since your own markup renders each menu. In the admin, its row labels use Payload's styles and follow Color Theory's admin colors when its applyToAdmin option is on.

Family. Menu is in the Navigation family, with Nested Docs Browser. They're meant to sit side by side in a site's navigation, but nothing in either plugin's code connects them yet. The families are a working draft that may change.

MIT © EXTANT APE

Similar plugins