Skip to content

Latest commit

 

History

History

inner-blocks-dcd824

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Inner Blocks Example

The goal of this example is to show how the component InnerBlocks allows to create custom blocks that accepts other blocks inside.

Example Description Tags Download .zip Live Demo
Inner Blocks Demonstrates how to create blocks that can contain other blocks using InnerBlocks component. 📦

Understanding the Example Code

At edit.js we can see how we import InnerBlocks from @wordpress/block-editor and use it inside our Edit component by setting a specific "template" for this block every time is inserted. From block.json we define the "allowedBlocks" that are allowed to be inserted within the InnerBlocks part of the block.

Related resources


Note Check the Start Guide for local development with the examples