Skip to main content

Nested blocks Overview

You can have any number of repeating blocks inside a content block.
For example a Gallery of images or a "Features" section of a website.

How does it work

You need two things to make it work:

  1. Use a React Bricks <Repeater> component where you need a repeating block
  2. Set up the repeaterItems property in the brick's schema

Optionally, you may also want to:

  • Set newItemMenuOpen to true or false on the brick's schema to decide if you want the "Add new..." menu open or closed by default. If you don't set this value, the default is open, if the number of repeaterItems is less or equal to 4, closed otherwise.
  • Set default props for the repeating items to have an initial set of nested blocks when a new block is created