Blocks Field

Admin panel screenshot of add Blocks drawer view
Admin panel screenshot of add Blocks drawer view

Example uses:

  • A layout builder tool that grants editors to design highly customizable page or post layouts. Blocks could include configs such as Quote, CallToAction, Slider, Content, Gallery, or others.
  • A form builder tool where available block configs might be Text, Select, or Checkbox.
  • Virtual event agenda "timeslots" where a timeslot could either be a Break, a Presentation, or a BreakoutSession.

Field config

name *To be used as the property name when stored and retrieved from the database. More
labelText used as the heading in the Admin panel or an object with keys for each language. Auto-generated from name if not defined.
blocks *Array of block configs to be made available to this field.
validateProvide a custom validation function that will be executed on both the Admin panel and the backend. More
minRowsA number for the fewest allowed items during validation when a value is present.
maxRowsA number for the most allowed items during validation when a value is present.
saveToJWTIf this field is top-level and nested in a config supporting Authentication, include its data in the user JWT.
hooksProvide field-level hooks to control logic for this field. More
accessProvide field-level access control to denote what users can see and do with this field's data. More
hiddenRestrict this field's visibility from all APIs entirely. Will still be saved to the database, but will not appear in any API response or the Admin panel.
defaultValueProvide an array of block data to be used for this field's default value. More
localizedEnable localization for this field. Requires localization to be enabled in the Base config. If enabled, a separate, localized set of all data within this field will be kept, so there is no need to specify each nested field as localized.
uniqueEnforce that each entry in the Collection has a unique value for this field.
labelsCustomize the block row labels appearing in the Admin dashboard.
adminAdmin-specific configuration. See below for more detail.
customExtension point for adding custom data (e.g. for plugins)

* An asterisk denotes that a property is required.

Admin Config

In addition to the default field admin config, you can adjust the following properties:

initCollapsedSet the initial collapsed state

Block configs

Blocks are defined as separate configs of their own.

slug *Identifier for this block type. Will be saved on each block as the blockType property.
fields *Array of fields to be stored in this block.
labelsCustomize the block labels that appear in the Admin dashboard. Auto-generated from slug if not defined.
imageURLProvide a custom image thumbnail to help editors identify this block in the Admin UI.
imageAltTextCustomize this block's image thumbnail alt text.
interfaceNameCreate a top level, reusable Typescript interface & GraphQL type.
graphQL.singularNameText to use for the GraphQL schema name. Auto-generated from slug if not defined. NOTE: this is set for deprecation, prefer interfaceName.

Auto-generated data per block

In addition to the field data that you define on each block, Payload will store two additional properties on each block:


The blockType is saved as the slug of the block that has been selected.


The Admin panel provides each block with a blockName field which optionally allows editors to label their blocks for better editability and readability.



import { Block, CollectionConfig } from 'payload/types'
const QuoteBlock: Block = {
slug: 'Quote', // required
imageURL: '',
imageAltText: 'A nice thumbnail image to show what this block looks like',
interfaceName: 'QuoteBlock', // optional
fields: [
// required
name: 'quoteHeader',
type: 'text',
required: true,
name: 'quoteText',
type: 'text',
export const ExampleCollection: CollectionConfig = {
slug: 'example-collection',
fields: [
name: 'layout', // required
type: 'blocks', // required
minRows: 1,
maxRows: 20,
blocks: [
// required


As you build your own Block configs, you might want to store them in separate files but retain typing accordingly. To do so, you can import and use Payload's Block type:

import type { Block } from 'payload/types'

Checkbox Field