Documentation

Use your first block

From the add command to a live page — the editor side of the flow, start to finish.

You've run payload-components add (see Installation for the CLI side). The wiring is already done — here's the editor journey, from the Payload admin to a live page, using Feature Grid Basic as the example. Every component follows the same path.

Why the block is already there

add didn't just copy files. It registered the block in your Pages layout field and mapped it in RenderBlocks, then regenerated types and the admin import map. So the block shows up in the admin block picker with no extra wiring — that's the whole point of the wrapper CLI.

Open a page in the admin. Start your project (pnpm dev) and go to /admin. Open an existing Page or create a new one — blocks live on the page's layout field.

Add the block — it's already in the picker. In the layout field, click Add Block. Feature Grid Basic is listed alongside the starter blocks, because add registered it for you.

Payload admin block picker showing Feature Grid Basic among the available blocks

Fill the content. Select the block and complete its fields — eyebrow, title, description, and a few items. They come straight from the content model; required fields are marked.

Feature Grid Basic block fields filled in inside the Payload admin

Publish. Save and publish the page. There's nothing else to wire — the block is fully typed and registered.

See it live. The page renders the block through RenderBlocks on the frontend. Here's the component you just configured:

import type { Block } from 'payload'import { featureFields } from '@/blocks/shared/featureFields'import { linkGroup } from '@/fields/linkGroup'export const FeatureGridBasic: Block = {  slug: 'featureGridBasic',  interfaceName: 'FeatureGridBasicBlock',  fields: [    // Shared feature core (eyebrow, title, description). Variant-specific fields    // follow; edit the shared shape in @/blocks/shared/featureFields.    ...featureFields,    {      name: 'items',      type: 'array',      required: true,      minRows: 3,      maxRows: 6,      admin: {        initCollapsed: true,      },      fields: [        {          name: 'title',          type: 'text',          required: true,        },        {          name: 'description',          type: 'textarea',          required: true,        },      ],    },    linkGroup({      overrides: {        admin: {          initCollapsed: true,        },        maxRows: 1,      },    }),  ],  labels: {    plural: 'Feature Grid Basic Blocks',    singular: 'Feature Grid Basic',  },}

Where to next

On this page