Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@wordpress/block-library

WordPress115.8kGPL-2.0-or-later9.25.0TypeScript support: included

Block library for the WordPress editor.

wordpress, gutenberg, blocks

readme

Gutenberg

End-to-End Tests Static Analysis (Linting, License, Type checks...) Unit Tests Create Block React Native E2E Tests (iOS) React Native E2E Tests (Android)

Storybook Badge

lerna

Screenshot of the Gutenberg Editor, editing a post in WordPress

Welcome to the development hub for the WordPress Gutenberg project!

"Gutenberg" is a codename for a whole new paradigm in WordPress site building and publishing, that aims to revolutionize the entire publishing experience as much as Gutenberg did the printed word. Right now, the project is in the second phase of a four-phase process that will touch every piece of WordPress -- Editing, Customization, Collaboration (which includes Real-time collaboration, Asynchronous collaboration, Publishing flows, Post revisions interface, Admin design, Library), and Multilingual -- and is focused on a new editing experience, the block editor.

The block editor introduces a modular approach to pages and posts: each piece of content in the editor, from a paragraph to an image gallery to a headline, is its own block. And just like physical blocks, WordPress blocks can be added, arranged, and rearranged, allowing WordPress users to create media-rich pages in a visually intuitive way -- and without work-arounds like shortcodes or custom HTML.

The block editor first became available in December 2018, and we're still hard at work refining the experience, creating more and better blocks, and laying the groundwork for the next three phases of work. The Gutenberg plugin gives you the latest version of the block editor, so you can join us in testing bleeding-edge features, start playing with blocks, and maybe get inspired to build your own.

Check out the Keeping up with Gutenberg Index

Getting Started

Get hands on: check out the block editor live demo to play with a test instance of the editor.

Using Gutenberg

Developing for Gutenberg

Extending and customizing is at the heart of the WordPress platform, this is no different for the Gutenberg project. The editor and future products can be extended by third-party developers using plugins.

Review the Quick Start Guide for the fastest way to get started extending the block editor. See the Block Editor Handbook for extensive tutorials, documentation, and API references. Also, check the WordPress Developer Blog for great articles about block development, among other topics.

Contribute to Gutenberg

Gutenberg is an open-source project and welcomes all contributors from code to design, and from documentation to triage. The project is built by many contributors and volunteers, and we'd love your help building it.

See the Contributors Handbook for all the details on how you can contribute.

To get up and running quickly with code contribution see Getting Started With Code Contribution. Also check out the other resources available on the Code Contributions page.

In whichever way you wish to contribute please be sure to read the Contributing Guidelines first.

As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our Code of Conduct.

Get Involved

You can join us in the #core-editor channel in Slack, see the WordPress Slack page for signup information; it is free to join.

License

WordPress is free software, and is released under the terms of the GNU General Public License version 2 or (at your option) any later version. See LICENSE.md for complete license.



Code is Poetry.

changelog

Unreleased

9.25.0 (2025-06-04)

9.24.0 (2025-05-22)

9.23.0 (2025-05-07)

9.22.0 (2025-04-11)

9.21.0 (2025-03-27)

9.20.0 (2025-03-13)

Enhancements

  • Query Loop Block: Enable custom order or menu_order ordering option for post types that support it. (#68781)

9.19.0 (2025-02-28)

9.18.0 (2025-02-12)

9.17.0 (2025-01-29)

9.16.0 (2025-01-15)

9.15.0 (2025-01-02)

9.14.0 (2024-12-11)

9.13.0 (2024-11-27)

9.12.0 (2024-11-16)

9.11.0 (2024-10-30)

9.10.0 (2024-10-16)

9.9.0 (2024-10-03)

9.8.0 (2024-09-19)

9.7.0 (2024-09-05)

9.6.0 (2024-08-21)

9.5.0 (2024-08-07)

New Feature

  • Query Loop Block: Moves per page, offset, and pages controls into Inspector Controls. (#58207)

9.4.0 (2024-07-24)

9.3.0 (2024-07-10)

9.2.0 (2024-06-26)

9.1.0 (2024-06-15)

9.0.0 (2024-05-31)

Breaking Changes

  • Variables like process.env.IS_GUTENBERG_PLUGIN have been replaced by globalThis.IS_GUTENBERG_PLUGIN. Build systems using process.env should be updated (#61486).
  • Increase the minimum required Node.js version to v18.12.0 matching long-term support releases (#31270). Learn more about Node.js releases.

8.35.0 (2024-05-16)

Internal

  • Replaced classnames package with the faster and smaller clsx package (#61138).

8.34.0 (2024-05-02)

8.33.0 (2024-04-19)

8.32.0 (2024-04-03)

8.31.0 (2024-03-21)

8.30.0 (2024-03-06)

8.29.0 (2024-02-21)

8.28.0 (2024-02-09)

8.27.0 (2024-01-24)

8.26.0 (2024-01-10)

8.25.0 (2023-12-13)

8.24.0 (2023-11-29)

8.23.0 (2023-11-16)

8.22.0 (2023-11-02)

8.21.0 (2023-10-18)

Bug Fixes

  • Fix Image block lightbox missing alt attribute and improve accessibility. (#54608)

8.20.0 (2023-10-05)

8.19.0 (2023-09-20)

8.18.0 (2023-08-31)

8.17.0 (2023-08-16)

8.16.0 (2023-08-10)

8.15.0 (2023-07-20)

8.14.0 (2023-07-05)

8.13.0 (2023-06-23)

8.12.0 (2023-06-07)

8.11.0 (2023-05-24)

8.10.0 (2023-05-10)

8.9.0 (2023-04-26)

8.8.0 (2023-04-12)

8.7.0 (2023-03-29)

8.6.0 (2023-03-15)

8.5.0 (2023-03-01)

8.4.0 (2023-02-15)

8.3.0 (2023-02-01)

8.2.0 (2023-01-11)

8.1.0 (2023-01-02)

8.0.0 (2022-12-14)

Breaking Changes

  • Updated dependencies to require React 18 (#45235)

7.19.0 (2022-11-16)

7.18.0 (2022-11-02)

7.17.0 (2022-10-19)

7.16.0 (2022-10-05)

7.15.0 (2022-09-21)

7.14.0 (2022-09-13)

New Features

  • Made it possible to import individual blocks (#42258). Check README for more information.

7.13.0 (2022-08-24)

Bug Fixes

  • Ensure all dependencies allow version ranges (#43355).

7.12.0 (2022-08-10)

7.11.0 (2022-07-27)

7.10.0 (2022-07-13)

7.9.0 (2022-06-29)

7.8.0 (2022-06-15)

7.7.0 (2022-06-01)

7.6.0 (2022-05-18)

Enhancements

  • Declare blocks as __experimental in block.json to automate syncing Gutenberg packages to WordPress (#40655).

7.5.0 (2022-05-04)

7.4.0 (2022-04-21)

7.3.0 (2022-04-08)

7.2.0 (2022-03-23)

Bug Fixes

  • Table block: Fix deprecation eligibility to prevent loss of named (color palette) background color (#39445).

Enhancements

  • Social Icons: Avoid loss of previously selected background color when switching back from "Logos Only" style (#39276).

7.1.0 (2022-03-11)

7.0.0 (2022-02-10)

Breaking Changes

  • The GUTENBERG_PHASE environment variable has been renamed to IS_GUTENBERG_PLUGIN and is now a boolean (#38202).

Bug Fixes

  • Gallery block: disable edit as html support (#39318).
  • Removed unused @wordpress/escape-html and @wordpress/is-shallow-equal dependencies (#38388).

6.1.0 (2022-01-27)

  • Code quality: Add block schema to each core block (#35900).

6.0.0 (2021-09-09)

Breaking Changes

  • Remove the background-colors, foreground-colors, and gradient-colors mixins.

5.0.0 (2021-07-29)

Breaking Changes

  • Upgraded React components to work with v17.0 (#29118). There are no new features in React v17.0 as explained in the blog post.

4.0.0 (2021-07-21)

Breaking Changes

  • Removes the core/legacy-widget block. This is now in @wordpress/widgets via registerLegacyWidgetBlock().

Bug Fixes

  • Include missing attributes when upgrading embed block (#33235)

3.2.0 (2021-05-24)

New Features

  • Marks the core/legacy-widget block as stable.

3.1.0 (2021-05-20)

3.0.0 (2021-05-14)

Breaking Changes

2.29.0 (2021-03-17)

Bug Fixes

  • Fix a regression where the Cover block migration would not work with a non-default contentPosition (#29542)

2.28.0 (2021-02-01)

New Features

  • Allow setting the crossOrigin attribute so the useTransformImage hook can use cross-origin sources (#28255).

Bug Fixes

  • Fix a regression where the Cover block migration would not work with custom units for minHeight (#28627)

2.27.0 (2020-12-17)

Enhancements

  • File Block: Copy url button is moved to Block toolbar.
  • Code and Preformatted Blocks: delete on backspace from an empty block.

Bug Fixes

  • Fix a regression where the Cover would not show opacity controls for the default overlay color (#26625).
  • Fix a regression (#26545) where the Cover block lost its default background overlay color (#26569).
  • Fix Image Block, reset image dimensions when replace URL. bug mentioned in (#26333).

Enhancements

  • File Block: Copy url button is moved to Block toolbar.

2.23.0 (2020-09-03)

Enhancements

  • Site title is now a link.

New Features

  • Add heading level controls to Site Title block.

2.12.0 (2020-01-13)

Bug Fixes

  • Fixes a regression published in version 2.9.2 that would prevent some build tools from including styles provided in the packages build-styles directory.

2.7.0 (2019-08-05)

Enhancements

  • Heading block uses has-text-align-* class names rather than inline style for text alignment.
  • Verse block uses has-text-align-* class names rather than inline style for text alignment.

Bug Fixes

  • Fixed insertion of columns in the table block, which now inserts columns for all table sections (#16410)

2.6.0 (2019-06-12)

  • Fixed an issue with creating upgraded embed blocks that are not registered (#15883).

2.5.0 (2019-05-21)

  • Add vertical alignment controls to Columns Block (#13899).
  • Add vertical alignment controls to Media & Text Block (#13989).
  • Add wide and full alignments to Archives block (#14533).
  • Add wide and full alignments to Categories block (#14533).
  • Add all alignment options to RSS block (#14533).
  • Add all alignment options to Search block (#14533).
  • Add image fill option and focal point picker to Media & Text block (#14445).
  • Updated the edit flow of the image block, updated the edit icon and unified the image editing in only one UI based on MediaPlaceholder

Bug Fixes

  • fix uncaught error in columns block due to accessing a property on an object that might be undefined #14605

2.3.0 (2019-03-06)

New Features

  • Add background color controls for the table block.
  • Add new RSS block (#7966).
  • Add new Search block (#13583).

2.2.12 (2019-01-03)

2.2.11 (2018-12-18)

2.2.10 (2018-12-12)

2.2.9 (2018-11-30)

2.2.8 (2018-11-30)

2.2.7 (2018-11-22)

2.2.6 (2018-11-21)

2.2.5 (2018-11-20)

2.2.4 (2018-11-15)

2.2.3 (2018-11-12)

Bug Fixes

  • Add a minimum width for the audio block to fixed floated audio blocks.

2.2.2 (2018-11-12)

Internal

  • Columns Block: Improve usability while editing columns.

2.2.1 (2018-11-09)

2.2.0 (2018-11-09)

New Features

  • Gallery Block: Add screen reader support for order of images in gallery.

2.1.8 (2018-11-03)

Internal

  • File Block: Create file blocks when dropping multiple files at once.

2.1.7 (2018-10-30)

2.1.6 (2018-10-30)

Bug Fixes

  • Classic Block: Prevent theme styles from italicising the italicise button.
  • Gallery Block: Fix the "Remove Image" button appearing blank when an image is focussed.

2.1.5 (2018-10-29)

2.1.4 (2018-10-22)

Bug Fixes

  • Video Block: Set correct media types for the poster image.

2.1.3 (2018-10-19)

2.1.2 (2018-10-18)

2.1.0 (2018-10-10)

New Features

  • Include the classic block if wp.oldEditor is defined.
  • Include the HTML block.

2.0.0 (2018-09-05)

Breaking Changes

  • Change how required built-ins are polyfilled with Babel 7 (#9171). If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using core-js or @babel/polyfill will add support for these methods.

Deprecations

  • Attribute type coercion has been deprecated. Omit the source to preserve type via serialized comment demarcation.