Blocks
Gallery
Showcase a collection of media
Installation
npx shadcn@latest add https://payload-bricks.bblank.dev/r/gallery-block.jsonUsage
import { Gallery } from "@/blocks/gallery/gallery-config"
import type { CollectionConfig } from "payload"
export const Pages: CollectionConfig<"pages"> = {
slug: "pages",
fields: [
{
name: "layout",
type: "blocks",
blocks: [Gallery],
required: true,
},
],
}Block structure
| name | type | |
|---|---|---|
intro | group | intro field |
items | array | |
media | group | media with aspect field, inside items |
richText | rich text | rich text field, inside items |