Skip to content

Simple Examples of Native Gutenberg blocks for the WordPress Block Editor

Notifications You must be signed in to change notification settings

MRKWP/native-gutenberg-blocks-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Native Gutenberg Block Examples for the Block Editor.

Available Block Examples.

Grid Block (grid-block).

This is a block with a Range control to change the number of columns added as a class to the holding HTML div. You can then make it change by CSS or SCSS for that matter.

Toggle Block (toggle-block).

Add a dynamic custom-class style class to your block markup using a toggle control. This block also shows you to add a hard coded block attribute using data-id as an example.

Toggle Block Sample

How to use

  1. Clone the repo to your local computer using:
https://github.com/MRKWP/native-gutenberg-blocks-examples/
  1. Choose any of the blocks you prefer and add it to your wp-content/plugins directory and activate it.

  2. Change into the directory of the block you want to use e.g. grid-block

cd grid-block
  1. Install the packages needed to compile the script.
npm install
  1. To compile your make changes to your project, run:
npm start

Note: The block will not work without you running step 5 above. The build directory is left out on purpose to allow the build process to be run.

About

Simple Examples of Native Gutenberg blocks for the WordPress Block Editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published