Block Development Examples

November 24, 2025 ยท View on GitHub

Release with Examples Zips ๐Ÿ” Static Linting

Important


Go to the Block Development Examples Web App to navigate through the examples

โ€ƒ
Go to the Block Development Examples Web App
โ€ƒ

Welcome to the block-development-examples repo on GitHub. Here you can find a bunch of block-related examples for WordPress that you can use to learn about Block Development.

Check the code, download the plugin zip ๐Ÿ“ฆ or see a playground-powered live demo of each example

ExampleDescriptionTagsDownload .zipLive Demo
Basic Block with Dynamic RenderingDemonstrates how to create a block that renders its content dynamically on the server side rather than saving static content in the post content.dynamic-rendering create-block๐Ÿ“ฆ
Basic Block with TranslationsShows how to implement internationalization (i18n) in a WordPress block using both PHP and JavaScript translations, demonstrating proper setup of translation files and functions.static-rendering๐Ÿ“ฆ
Block with Static RenderingIllustrates how to create a block that saves its content as static HTML in the post content, showing the basic pattern for static block rendering.static-rendering create-block๐Ÿ“ฆ
Block EditableShows how to create a block with editable content using the block editor's core editing components and attributes.๐Ÿ“ฆ
Non-block wp data with ReactDemonstrates how to use @wordpress/data with React components outside of the block editor context, showing data management patterns.no-block wp-data๐Ÿ“ฆ
Minimal BlockA bare-bones example showing the minimum required code to create a functional WordPress block.minimal featured๐Ÿ“ฆ
Minimal Gutenberg Block (No Build)Shows how to create a simple block without a build process, using vanilla JavaScript and WordPress's built-in scripts.minimal no-build๐Ÿ“ฆ
Interactive BlocksCollection of examples showing how to create blocks with interactive features and client-side functionality.interactive-block multi-block๐Ÿ“ฆ
Format APIDemonstrates how to use the WordPress Format API to add custom text formatting options to the editor.no-block๐Ÿ“ฆ
StylesheetsShows different approaches to adding and managing styles in blocks, including editor-specific and front-end styles.styles featured๐Ÿ“ฆ
Basic ESNextDemonstrates how to create a basic block using modern JavaScript (ESNext) and JSX syntax with a build process powered by @wordpress/scripts.minimal๐Ÿ“ฆ
Block SupportsShowcases how to use WordPress block supports to add standard features like alignment, colors, and typography to blocks.supports featured๐Ÿ“ฆ
Dynamic BlockShows how to create blocks that render content dynamically using PHP, including data fetching and server-side rendering.dynamic-rendering๐Ÿ“ฆ
Interactivity API BlockDemonstrates the usage of WordPress's Interactivity API to create blocks with enhanced interactive capabilities.create-block-template interactive-block interactivity-api๐Ÿ“ฆ
Meta BlockShows how to create blocks that read and save data to post meta, demonstrating integration with WordPress metadata system.meta๐Ÿ“ฆ
Inner BlocksDemonstrates how to create blocks that can contain other blocks using InnerBlocks component.๐Ÿ“ฆ
SlotFillShows how to use WordPress SlotFill system to extend the editor interface with custom components.no-block slotfill๐Ÿ“ฆ
Block Toolbar ControlsDemonstrates how to add custom controls to the block toolbar for enhanced block editing capabilities.block-toolbar๐Ÿ“ฆ
RecipeA practical example showing how to create a complex block for recipe content with multiple editable fields and structured data.๐Ÿ“ฆ
Plugin SidebarShows how to add a custom sidebar to the editor using SlotFill and integrate it with post meta data.slotfill meta no-block๐Ÿ“ฆ
Data Basics - @wordpress/dataIntroduction to using @wordpress/data for state management in WordPress, covering basic concepts and patterns.no-block wp-data featured๐Ÿ“ฆ
Copyright Date BlockExample of a block that combines both static and dynamic rendering to display copyright information.dynamic-rendering static-rendering create-block featured๐Ÿ“ฆ
Interactivity API CountdownAdvanced example showing how to create an interactive countdown timer using the WordPress Interactivity API.dynamic-rendering interactive-block interactivity-api experimental block-toolbar๐Ÿ“ฆ
Block Settings SidebarDemonstrates how to add custom settings panels to the block sidebar for additional block configuration options.๐Ÿ“ฆ
Post Meta ModalShows how to create a modal interface for editing post meta data outside of the block context.meta no-block๐Ÿ“ฆ
Interactivity API QuizDemonstrates building an interactive quiz interface using the WordPress Interactivity API.interactive-block interactivity-api๐Ÿ“ฆ
Interactivity Router (regions) exampleShows how to implement client-side routing in blocks using the WordPress Interactivity API router functionality.interactivity-api interactivity-router๐Ÿ“ฆ
Server Side Render BlockThis example demonstrates how to build a simple block that is rendered on the server and displayed in the Editor using the ServerSideRender component.server-side-rendering๐Ÿ“ฆ
Post Meta TestimonialShows how to create a testimonial block that uses post meta data to store and display testimonial information.meta block๐Ÿ“ฆ
Editor BindingsShows how to create a block that uses editor bindings to connect custom fields to the block editor.block-bindings๐Ÿ“ฆ

More info

Check the WIKI of this repo for more info about it:

  1. Getting Started
  2. Examples
  3. Local Development Guide
  4. Conventions for examples
  5. Adding new examples