UI

Render Blocks

Component for rendering PayloadCMS blocks dynamically with proper typing

Preview

<RenderBlocks
  blocks={page.blocks}
  blockComponents={{
    hero: HeroComponent,
    header: HeaderComponent,
  }}
  user={user}
/>

Props

The RenderBlocks component accepts the following props:

Prop

Type

Installation

npx shadcn@latest add @uifoundry/renderblocks

If you encounter issues, check the registry setup guide for configuration help.

Registry Dependencies

This component has no registry dependencies.

Dependencies

This component requires the following NPM packages:

  • PayloadCMS - Headless CMS and application framework
  • React - JavaScript library for building user interfaces