Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

payload-discussions

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

payload-discussions

Payload CMS plugin that adds threaded comment discussions with nested replies, and author tracking to collections and globals.

latest
Source
npmnpm
Version
1.1.11
Version published
Weekly downloads
769
191.29%
Maintainers
1
Weekly downloads
 
Created
Source

payload-discussions

Threaded comment discussions with nested replies and author tracking for Payload CMS.

npm version License: MIT

Overview

Attach threaded discussions to any collection or global in Payload. Comments support nested replies, are linked to authenticated users, and are automatically cleaned up when parent documents are deleted or restored. A ready-made sidebar component integrates directly into the admin panel.

Features

  • Threaded replies -- nested comment threads with configurable maximum depth.
  • Sidebar UI -- a field component that renders discussions in the Payload admin sidebar.
  • Lifecycle handling -- comments follow their parent document through soft-delete, permanent delete, and restore.
  • Collection & global support -- attach discussions to any combination of collections and globals.

Installation

pnpm add payload-discussions

Usage

// payload.config.ts
import { buildConfig } from "payload";
import { discussionsPlugin } from "payload-discussions";

export default buildConfig({
  // ...
  plugins: [
    discussionsPlugin({
      collections: ["posts", "pages"],
      globals: ["settings"],
    }),
  ],
});

Options

OptionTypeDefaultDescription
collectionsCollectionSlug[][]Collections to add the discussions field to.
globalsGlobalSlug[][]Globals to add the discussions field to.
maxCommentDepthnumber5Maximum nesting depth for reply threads.
collectionSlugstring"comments"Slug used for the auto-created comments collection.

Contributing

This plugin lives in the payload-plugins monorepo.

Development

pnpm install

# watch this plugin for changes
pnpm --filter payload-discussions dev

# run the Payload dev app (in a second terminal)
pnpm --filter sandbox dev

The sandbox/ directory is a Next.js + Payload app that imports plugins via workspace:* — use it to test changes locally.

Code quality

  • Formatting & linting — handled by Biome, enforced on commit via husky + lint-staged.
  • Commits — must follow Conventional Commits with a valid scope (e.g. fix(payload-discussions): ...).
  • Changesets — please include a changeset in your PR by running pnpm release.

Issues & PRs

Bug reports and feature requests are welcome — open an issue.

License

MIT

Keywords

payload

FAQs

Package last updated on 25 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts