krzysztofradomski

payload plugin decks

by krzysztofradomski
Media & images
v3
^3.84.0

Overview

Summary generated from the README

Adds a decks blocks field to chosen Payload collections, letting editors build slide-based decks with background images, headlines and subtext. It ships a block config and a client renderer built on Remotion for the frontend. Requires Payload 3.84 or newer and an upload collection with the slug media.

Features

  • Adds a configurable decks blocks field to selected collections
  • Exports a DecksBlock config to add to an existing blocks field
  • Slides support images, headline, subtext, text color and nine text positions
  • Animation options include fadeIn, slideUp, slideDown, scaleIn and none
  • Deck settings for fps, slide duration, transition, autoplay, loop and controls
  • Client renderer component and a normalizer for saved block data

Use cases

  • Show an animated image slideshow in a page hero built from CMS content
  • Let editors compose autoplaying slide decks inside an existing page layout builder

From the author

Deck blocks and renderers for Payload CMS

Installation

npm i payload-plugin-decks

0

Stars

0

Forks

0

Open Issues

5 months ago

Last Updated

12

Weekly Downloads

v1.0.3

npm Version

105.4 KB

Unpacked Size

0

Dependencies

GitHub stars

00 since Sep 6

Show data
GitHub stars by day (UTC)
DateStars
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
Oct 31, 20260
Oct 30, 20260
Oct 29, 20260
Oct 28, 20260
Oct 27, 20260
Oct 26, 20260
Oct 25, 20260
Oct 24, 20260
Oct 23, 20260
Oct 22, 20260
Oct 21, 20260
Oct 20, 20260
Oct 19, 20260
Oct 18, 20260
Oct 17, 20260
Oct 16, 20260
Oct 15, 20260
Oct 14, 20260
Oct 13, 20260
Oct 12, 20260
Oct 11, 20260
Oct 10, 20260
Oct 9, 20260
Oct 8, 20260
Oct 7, 20260
Oct 6, 20260
Oct 5, 20260
Oct 4, 20260
Oct 3, 20260
Oct 2, 20260
Oct 1, 20260
Sep 30, 20260
Sep 29, 20260
Sep 28, 20260
Sep 27, 20260
Sep 26, 20260
Sep 25, 20260
Sep 24, 20260
Sep 23, 20260
Sep 22, 20260
Sep 21, 20260
Sep 20, 20260
Sep 19, 20260
Sep 18, 20260
Sep 17, 20260
Sep 16, 20260
Sep 15, 20260
Sep 14, 20260
Sep 13, 20260
Sep 12, 20260
Sep 11, 20260
Sep 10, 20260
Sep 9, 20260
Sep 8, 20260
Sep 7, 20260
Sep 6, 20260
npm weekly downloads

4−2 since Sep 6

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 5, 20264
Dec 4, 20264
Dec 3, 20264
Dec 2, 20262
Dec 1, 20267
Nov 30, 20267
Nov 29, 20266
Nov 28, 20266
Nov 27, 20266
Nov 26, 20266
Nov 25, 20267
Nov 24, 20263
Nov 23, 20263
Nov 22, 20265
Nov 21, 20265
Nov 20, 20265
Nov 19, 20266
Nov 18, 20265
Nov 17, 20264
Nov 16, 20267
Nov 15, 20268
Nov 14, 20268
Nov 13, 202611
Nov 12, 202613
Nov 11, 202615
Nov 10, 202615
Nov 9, 202613
Nov 8, 202614
Nov 7, 202627
Nov 6, 202625
Nov 5, 202623
Nov 4, 202621
Nov 3, 202621
Nov 2, 202625
Nov 1, 202624
Oct 31, 202612
Oct 30, 202615
Oct 29, 202614
Oct 28, 202614
Oct 27, 202621
Oct 26, 202618
Oct 25, 202615
Oct 24, 202616
Oct 23, 202611
Oct 22, 202615
Oct 21, 202616
Oct 20, 202611
Oct 19, 20269
Oct 18, 202610
Oct 17, 202610
Oct 16, 202611
Oct 15, 20268
Oct 14, 20267
Oct 13, 20265
Oct 12, 20265
Oct 11, 20265
Oct 10, 20263
Oct 9, 20264
Oct 8, 20267
Oct 7, 202610
Oct 6, 202611
Oct 5, 202611
Oct 4, 202610
Oct 3, 202611
Oct 2, 202620
Oct 1, 202628
Sep 30, 202625
Sep 29, 202624
Sep 28, 202624
Sep 27, 202630
Sep 26, 202632
Sep 25, 202621
Sep 24, 20269
Sep 23, 20269
Sep 22, 202612
Sep 21, 202612
Sep 20, 20267
Sep 19, 20265
Sep 18, 20269
Sep 17, 202610
Sep 16, 202611
Sep 15, 20268
Sep 14, 202610
Sep 13, 202611
Sep 12, 202613
Sep 11, 20269
Sep 10, 20268
Sep 9, 20268
Sep 8, 20268
Sep 7, 20268
Sep 6, 20266

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

Health Score

46/100Fair

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/1229200348-root.svg)](https://payloaddirectory.dev/plugins/1229200348-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1229200348-root"><img src="https://payloaddirectory.dev/badge/1229200348-root.svg" alt="Payload Directory"></a>
Updated Jun 16, 2026Created May 4, 2026Published Jun 16, 2026

README

payload-plugin-decks

payload-plugin-decks adds reusable deck blocks to Payload collections. Today it ships a decks block: a slide-based, Remotion-powered deck with background images, headlines, subtext, text positioning, transitions, autoplay, looping, and optional playback controls.

The plugin adds the editing fields to Payload. Your frontend decides where and how to render the saved deck blocks.

Requirements

  • Payload ^3.84.0
  • React / Next.js frontend capable of rendering client components
  • A Payload upload collection with slug media

The decks block's image field is currently configured with relationTo: 'media', so your Payload app must define a media collection.

Install

pnpm add payload-plugin-decks

The package includes its Remotion runtime dependencies:

  • @remotion/player
  • remotion

Configure Payload

Add payloadDecks to your Payload config and choose the collections that should receive the decks field.

import { buildConfig } from 'payload'
import { payloadDecks } from 'payload-plugin-decks'

export default buildConfig({
  collections: [
    {
      slug: 'pages',
      fields: [
        // your fields
      ],
    },
    {
      slug: 'media',
      upload: true,
      fields: [],
    },
  ],
  plugins: [
    payloadDecks({
      collections: {
        pages: true,
      },
    }),
  ],
})

This adds a decks blocks field to the configured collection. Editors can add one or more decks blocks inside that field.

Options

type PayloadDecksConfig = {
  collections?: Partial<Record<CollectionSlug, true>>
  disabled?: boolean
  fieldName?: string
}
OptionDefaultDescription
collectionsundefinedCollections that should receive the decks blocks field.
fieldName'decks'Name of the blocks field added to each configured collection.
disabledfalseLeaves schema additions in place but skips runtime plugin behavior.

Custom field name

payloadDecks({
  collections: {
    pages: true,
    posts: true,
  },
  fieldName: 'heroDecks',
})

Alternative: add the block to an existing blocks field

If your collection already has a blocks field (for example a page layout builder), you usually do not want the payloadDecks() plugin — it would add a second, separate decks field disconnected from your existing one. Instead, import the DecksBlock block config and add it to the field you already manage, alongside your other blocks:

import { DecksBlock } from 'payload-plugin-decks'

export const Pages = {
  slug: 'pages',
  fields: [
    {
      name: 'layout',
      type: 'blocks',
      blocks: [
        // ...your existing blocks
        DecksBlock,
      ],
    },
  ],
}

Editors then pick Decks as one block among the others in that field, and you render it from the same array using the client renderer (see Render Decks).

Use payloadDecks() when you want a brand-new, dedicated decks field added for you; use the DecksBlock config directly when decks should be one choice within a blocks field you already have.

Render Decks

The plugin does not automatically render decks in your frontend. Render the blocks from the field you added, usually inside your existing page or post block renderer.

import dynamic from 'next/dynamic'
import type { DecksBlockProps } from 'payload-plugin-decks'

const DecksBlock = dynamic(
  () => import('payload-plugin-decks/client').then((mod) => mod.DecksBlock),
  { ssr: false },
)

type DecksBlockData = DecksBlockProps & {
  blockType: 'decks'
  id?: string
}

type DeckBlock = DecksBlockData

export function DecksRenderer({ decks = [] }: { decks?: DeckBlock[] }) {
  return (
    <>
      {decks.map((deck, index) => {
        switch (deck.blockType) {
          case 'decks':
            return <DecksBlock key={deck.id || index} {...deck} />
          default:
            return null
        }
      })}
    </>
  )
}

If you generate Payload types, prefer using the generated collection type for your renderer props.

Decks Fields

Each decks block supports:

FieldDescription
titleOptional internal reference for editors.
fpsVideo frame rate. Defaults to 30.
durationPerSlideSeconds each slide is displayed. Defaults to 3.
transitionDurationFade transition duration in frames. Defaults to 15.
backgroundColorComposition background color. Defaults to #000000.
autoPlayStarts playback automatically. Defaults to true.
loopLoops playback. Defaults to true.
showControlsShows Remotion player controls. Defaults to false.
slidesOrdered slide array. Requires at least one slide.

Each slide supports:

FieldDescription
imageOptional background image from the media collection.
headlineOptional headline text.
subtextOptional supporting text.
textColorText color. Defaults to #ffffff.
textPositionOne of top-left, top-center, top-right, center-left, center, center-right, bottom-left, bottom-center, bottom-right.
animationTypeOne of fadeIn, slideUp, slideDown, scaleIn, none.
imageZoomEnables a slow Ken Burns-style image zoom. Defaults to true.

Exports

import { DecksBlock, payloadDecks } from 'payload-plugin-decks'
import { DecksBlock as DecksRenderer } from 'payload-plugin-decks/client'
ExportDescription
payloadDecksPayload plugin factory.
DecksBlock from payload-plugin-decksPayload block config for advanced composition.
DecksBlock from payload-plugin-decks/clientClient renderer for saved decks block data.
DecksBlockPropsRenderer prop type.
DecksSlideSlide prop type.
normalizeDecksBlockNormalizes saved Payload block data into the renderer interface.

Development

pnpm install
pnpm build
pnpm test:int
pnpm lint

The integration test uses mongodb-memory-server, so it needs permission to bind a local port in sandboxed environments.

Similar plugins