PHPackages                             micropackage/acf-block-creator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. micropackage/acf-block-creator

ActiveLibrary

micropackage/acf-block-creator
==============================

ACF Block Creator - automatic block creation add-on for ACF

1.0.7(11mo ago)4220.2k↓50%7[1 issues](https://github.com/micropackage/acf-block-creator/issues)GPL-3.0-or-laterPHPPHP &gt;=5.6

Since Jan 30Pushed 11mo ago3 watchersCompare

[ Source](https://github.com/micropackage/acf-block-creator)[ Packagist](https://packagist.org/packages/micropackage/acf-block-creator)[ RSS](/packages/micropackage-acf-block-creator/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (5)Dependencies (6)Versions (10)Used By (0)

ACF Block Creator
=================

[](#acf-block-creator)

[![BracketSpace Micropackage](https://camo.githubusercontent.com/7a9f5ff780f859fdebce60d4e11572de05f86c42ef96b77967c24d7ea7d1e04b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f427261636b657453706163652d4d6963726f7061636b6167652d627269676874677265656e)](https://bracketspace.com)[![Latest Stable Version](https://camo.githubusercontent.com/756a8045d213c0b38c222b5b9b8aa784270ab871e3f1a340be3081bbb018d2e5/68747470733a2f2f706f7365722e707567782e6f72672f6d6963726f7061636b6167652f6163662d626c6f636b2d63726561746f722f762f737461626c65)](https://packagist.org/packages/micropackage/acf-block-creator)[![PHP from Packagist](https://camo.githubusercontent.com/f3a946e7c3e38ecf0221f1a3886f408524c2abb0dc9c2fdabec5ec1e99abd4eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d6963726f7061636b6167652f6163662d626c6f636b2d63726561746f722e737667)](https://packagist.org/packages/micropackage/acf-block-creator)[![Total Downloads](https://camo.githubusercontent.com/4afca80357df43a7fa10eb147c8994728539a9e8c833698a20f45755cc66cdfb/68747470733a2f2f706f7365722e707567782e6f72672f6d6963726f7061636b6167652f6163662d626c6f636b2d63726561746f722f646f776e6c6f616473)](https://packagist.org/packages/micropackage/acf-block-creator)[![License](https://camo.githubusercontent.com/68c595b0dd3e1572328f5f6d963570d2665b041cfaf2b483dd59d18372861fe4/68747470733a2f2f706f7365722e707567782e6f72672f6d6963726f7061636b6167652f6163662d626c6f636b2d63726561746f722f6c6963656e7365)](https://packagist.org/packages/micropackage/acf-block-creator)

 [![Micropackage logo](https://camo.githubusercontent.com/9b9fc4f221b3683db4f9cc63e1ed92220004bbda118206d0a26d5ce6377d4d46/68747470733a2f2f627261636b657473706163652e636f6d2f6578747261732f6d6963726f7061636b6167652f6d6963726f7061636b6167652d736d616c6c2e706e67)](https://camo.githubusercontent.com/9b9fc4f221b3683db4f9cc63e1ed92220004bbda118206d0a26d5ce6377d4d46/68747470733a2f2f627261636b657473706163652e636f6d2f6578747261732f6d6963726f7061636b6167652f6d6963726f7061636b6167652d736d616c6c2e706e67)

🧬 About ACF Block Creator
-------------------------

[](#-about-acf-block-creator)

This package simplifies block creation for Gutengberg editor in WordPress using Advanced Custom Fields plugin. It extends functonality of [Block Loader](https://github.com/micropackage/block-loader) package and is intended to use alongside it.

This package will automatically create a block template file with basic markup for ACF fields while creating a field group for a block.

💾 Installation
--------------

[](#-installation)

```
composer require --dev micropackage/acf-block-creator
```

🕹 Usage
-------

[](#-usage)

Before you can start creating blocks this package needs to be initialized:

```
Micropackage\ACFBlockCreator\ACFBlockCreator::init( [
	'blocks_dir'            => 'blocks',
	'scss_dir'              => false,
	'default_category'      => 'common',
	'block_container_class' => 'block-inner',
	'package'               => true,
	'license'               => 'GPL-3.0-or-later',
] );
```

Only thing to do is to create new ACF field group which name starts with "Block:". It will automatically create a block template file and set the field group location to this created block.

Block params (block name, slug, category etc.) can be adjusted using additional fields at the bottom of field group creation form.

[![ACF Block Creator demo](./.github/assets/usage-demo.gif?raw=true)](./.github/assets/usage-demo.gif?raw=true)

### Silent initialization

[](#silent-initialization)

Since this is a development package and is not useful in production environment we probably don't want it's initialization code in the production package of our theme. That's why this package will be automatically initialized by [Block Loader](https://github.com/micropackage/block-loader) if both packages will be present.

So if we will add this as dev dependency and then run `composer install --no-dev` this package will not be present and just won't get loaded by BlockLoader.

All configuration params of this package can be then passed directly to `BlockLoader::init` method.

Also `blocks_dir` param will not be necessary since it will automatically get the value of `dir` param for BlockLoader. If you configure a custom category it will also be automatically used as default category for new blocks.

⚙️ Configuration
----------------

[](#️-configuration)

All parameters are optional.

ParameterTypeDescription**blocks\_dir**(*string*)Directory inside the theme for block templates.
**Default:** `'blocks'`**scss\_dir**(*false|string*)Directory inside the theme for block sass styles file.
If set, the empty scss file will be created for each block in this directory.
**Default:** `false`**default\_category**(*string*)Default category for new blocks.
**Default:** `'common'`**block\_container\_class**(*string*)Optional class for wrapping `` element inside the block template.
**Default:** `'block-inner'`**package**(*bool|string*)String containing package name for file block comment. If set to true, WordPress site name will be used. If false, no `@package` comment will be added.
**Default:** `true`**license**(*false|string*)String containing license name for file block comment. If set to false no `@license` comment will be added.
**Default:** `'GPL-3.0-or-later'`📦 About the Micropackage project
--------------------------------

[](#-about-the-micropackage-project)

Micropackages - as the name suggests - are micro packages with a tiny bit of reusable code, helpful particularly in WordPress development.

The aim is to have multiple packages which can be put together to create something bigger by defining only the structure.

Micropackages are maintained by [BracketSpace](https://bracketspace.com).

📖 Changelog
-----------

[](#-changelog)

[See the changelog file](./CHANGELOG.md).

📃 License
---------

[](#-license)

GNU General Public License (GPL) v3.0. See the [LICENSE](./LICENSE) file for more information.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance50

Moderate activity, may be stable

Popularity37

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~278 days

Recently: every ~431 days

Total

8

Last Release

353d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fd1fdcaa145bfe7d6d015951da54a856f34988c581ae5a2de4c9df6d3b696ebc?d=identicon)[kubitomakita](/maintainers/kubitomakita)

---

Top Contributors

[![jakubmikita](https://avatars.githubusercontent.com/u/18362490?v=4)](https://github.com/jakubmikita "jakubmikita (32 commits)")[![szaleq](https://avatars.githubusercontent.com/u/25011639?v=4)](https://github.com/szaleq "szaleq (15 commits)")[![Dartui](https://avatars.githubusercontent.com/u/2657856?v=4)](https://github.com/Dartui "Dartui (2 commits)")

---

Tags

acfacf-builderbracketspacecomposer-librarygutenbergmicropackagewordpress

### Embed Badge

![Health badge](/badges/micropackage-acf-block-creator/health.svg)

```
[![Health](https://phpackages.com/badges/micropackage-acf-block-creator/health.svg)](https://phpackages.com/packages/micropackage-acf-block-creator)
```

###  Alternatives

[micropackage/block-loader

Block Loader - automatic Gutenberg blocks from template files.

2326.3k](/packages/micropackage-block-loader)[micropackage/dochooks

DocHooks - annotated WordPress hooks

3762.4k3](/packages/micropackage-dochooks)[micropackage/templates

Simple PHP template engine which is easy to use

2920.9k](/packages/micropackage-templates)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
