PHPackages                             goodwp/goodenberg - 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. goodwp/goodenberg

ActiveLibrary

goodwp/goodenberg
=================

Goodenberg is a library of components, helpers and examples for building modern WordPress sites and applications withthe block editor and all other features introduced with Gutenberg.

v0.3.1(10mo ago)23571↑90.9%[5 issues](https://github.com/goodwp/goodenberg/issues)GPL-3.0-or-laterJavaScript

Since Mar 31Pushed 10mo ago3 watchersCompare

[ Source](https://github.com/goodwp/goodenberg)[ Packagist](https://packagist.org/packages/goodwp/goodenberg)[ Docs](https://github.com/goodwp/goodenberg)[ RSS](/packages/goodwp-goodenberg/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (6)Versions (9)Used By (0)

Goodenberg
==========

[](#goodenberg)

Goodenberg is a library of components, helpers and examples for building modern WordPress sites and applications with the block editor and all other features introduced with Gutenberg.

> **Warning**
> This package is under active development and not considered stable, breaking changes can be added. I'm using the package on a few sites and some custom plugins successfully, but am still developing, optimizing and documenting it at the moment.

Table of Contents
-----------------

[](#table-of-contents)

- [Changelog](./CHANGELOG.md)
- [Versioning / Supported WordPress versions](#versioning--supported-wordpress-versions)
- [JavaScript / React](#javascript--react)
- [PHP](#php)
- [Examples](#examples)

Versioning / Supported WordPress versions
-----------------------------------------

[](#versioning--supported-wordpress-versions)

The library will follow SemVer versioning. Major versions and breaking changes will be kept to a minimum. Each minor version will support the latest stable WordPress version at the time of release. Development versions will try to work with newer Gutenberg versions.

Current supported WordPress version: WordPress 6.5

JavaScript / React
------------------

[](#javascript--react)

All JavaScript code is developed inside the `src` directory.

### Usage

[](#usage)

1. Install the package via `npm install @goodwp/goodenberg`
2. Use `@wordpress/scripts` for an easy build process and to automatically extract dependencies
3. Use single components/hooks/etc
    - All submodules (see below) can be imported from the submodules entrypoint `import {Page} from "@goodwp/goodenberg/admin/components";`
    - All submodules also provide directory-based imports: `import {Page} from "@goodwp/goodenberg/admin/components/page";`

### Architecture

[](#architecture)

The library only uses babel with the `@wordpress/babel-preset-default` preset to transpile each single js file, but does not have any other build-process. It is suggested to use @wordpress/scripts or a custom webpack config to bundle it.

Styles are created via @emotion to avoid requiring an additional stylesheet.

### Components (`components`)

[](#components-components)

React components to be used in your admin screens or custom blocks.

- [EntityRecordsSelect](src/components/entity-records-select/README.md): A component which allows a user to select multiple records ( post, term, etc.).
- [EntityRecordSelect](src/components/entity-record-select/README.md): A component which allows a user to select a single record ( post, term, etc.).

[More Information](src/components/README.md)

### Admin (`admin`)

[](#admin-admin)

React components, hooks, and utils for building pages in the wp-admin. Useful for building custom plugin pages, settings pages, etc. To be used together with @wordpress/components.

#### Components

[](#components)

- [Page](src/admin/components/README.md): A component to build a complete wp-admin page, including header, content, notices.
- [Page.Header](src/admin/components/README.md): A header bar for wp-admin pages.
- [AdminNotices](src/admin/components/README.md): A "slot" which will render all admin notices that were rendered on the server
- [Bar](src/admin/components/README.md): A full-width navigation bar for headers/footers on admin pages (used in Page.Header).
- [Container](src/admin/components/README.md): A centered container which has a configurable default max-width.
- [TabPanel](src/admin/components/README.md): A styled version of WordPress TabPanel component to be used on admin pages right beneath your Page.Header.

[More Information](src/admin/components/README.md)

#### Router

[](#router)

A simple "router" to render some components based on a current active "route". There are two implementations (one for URL-based routing, on for state-based routing). Both provide a similar API.

[More Information](src/admin/router/README.md)

### Hooks (`hooks`)

[](#hooks-hooks)

React hooks to be used in your admin screens or custom blocks.

- [`useApiFetch`](src/hooks/use-api-fetch/README.md): A hook wrapper around the [`apiFetch`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-api-fetch/) function from core.
- [`useLocation`/`useHistory`](src/hooks/use-location/README.md): A hook to use the URL/window.location and history object to use browser navigation.

[More Information](src/hooks/README.md)

### Utils (`utils`)

[](#utils-utils)

Handy utility functions.

- `getBlockStyle(className: string)`: Get the selected/applied block style by its classname.
- `onBlockRegistration(blockName, namespace, callback)`: Allows hooking into the registerBlockType hook of a specific block. Avoid having to check for the block name in your callback.
- `onBlockEdit(blockName, namespace, callback, higherOrderComponent = false)`: Allows hooking into the BlockEdit hook of a specific block. Avoid having to check for the block name in your callback.

[More Information](src/utils/README.md)

PHP
---

[](#php)

All PHP code is developed inside the `lib` directory.

**Usage**

1. Install the package via `composer require goodwp/goodenberg`
2. Load your composers autoload file in your plugin/theme.
3. Use the classes and helpers.

[More Information](lib/README.md)

Examples
--------

[](#examples)

The [examples directory](./examples) contains a plugin which uses a lot of the components. You can also test this plugin via @wordpress/env:

1. Clone the repository
2. Run `npm install`
3. Run `npm env:start`
4. Open `http://localhost:8888/wp-admin` and login with `admin` / `password`
5. Activate the plugin and open the example pages.

You can also use [WordPress Playground](https://playground.wordpress.net/) to directly see the examples in a browser:

1. Download the examples plugin from the [latest release](https://github.com/goodwp/goodenberg/releases/latest/download/goodenberg-examples.zip).
2. Go to
3. Upload and activate the plugin
4. Go to the new admin page "Goodenberg examples"

Bugs, Issues, Security Issues, Feature Requests
-----------------------------------------------

[](#bugs-issues-security-issues-feature-requests)

Visit our [GitHub Repository](https://github.com/goodwp/goodenberg).

Inspired by [10up/block-components](https://github.com/10up/block-components).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance50

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~76 days

Recently: every ~114 days

Total

7

Last Release

310d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/045e5a05029c64e49cf89846ce4a8f98c72bf5925daab2026d93fb9df35d1848?d=identicon)[goodwp](/maintainers/goodwp)

---

Top Contributors

[![gaambo](https://avatars.githubusercontent.com/u/5585580?v=4)](https://github.com/gaambo "gaambo (24 commits)")

---

Tags

gutenbergwordpresswordpresswpblocksgutenberg

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/goodwp-goodenberg/health.svg)

```
[![Health](https://phpackages.com/badges/goodwp-goodenberg/health.svg)](https://phpackages.com/packages/goodwp-goodenberg)
```

###  Alternatives

[infinum/eightshift-libs

WordPress libs developed by Eightshift team to use in modern WordPress.

63118.9k3](/packages/infinum-eightshift-libs)

PHPackages © 2026

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