Opensource-Odyssey Logo

#014 - how to create custom blocks in payloadcms

Author

Odysseus

Date Published

PayloadCMS is highly customizable - and one of the core building blocks are... BLOCKS! We create a custom block to house all of the frequently asked questions (and answers).

Tech discussed in this video

https://payloadcms.com/docs/fields/blocks

Timestamps

00:00 Intro
01:16 Blocks in PayloadCMS
03:18 Installing the shadcn accordion
05:19 Creating a basic block configuration
06:58 Creating the basic react component
07:20 Adding the block to pages
07:55 Filling out the basic react component
08:31 Rendering our custom block
09:08 Testing our basic component
09:32 Adding more style
09:47 Refactor block to an array
11:01 Adding a custom row label
12:26 Refactor text to rich text
13:55 Outro