npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@snapwp/blocks

v0.3.0

Published

Library for handling Gutenberg blocks.

Readme

@snapwp/blocks

A React component library for rendering and hydrating WordPress Blocks from their block data.

[!WARNING] 🐉 There be dragons! This project is in active development and considered experimental. Some features may be incomplete, unstable, or subject to change.

Installation

npm install @snapwp/blocks

Features

  • Additive DX: Just include or extend the Block Components you need, and fallback to default rendering for the rest.
  • Custom Block Definitions: Override components on a block-level, or even entire patterns, template parts, and templates.
  • Fallback Rendering: Uses html-react-parser to let you transform your WordPress data on even an HTML element level.
  • Comprehensive Support: Includes an ever-growing list of strongly-typed Block Components that can be used to recreate or enhance the block HTML markup.

When combined with a headless WordPress framework like SnapWP, this library offers parity with many modern WordPress features out of the box.

Usage

Basic Rendering

<EditorBlocksRenderer
	editorBlocks={ editorBlocks } // Array of blocks to render
	blockDefinitions={ blockDefinitions } // Optional custom block definitions
/>

Override Block Definitions

const blockDefinitions = {
	CoreParagraph: CustomCoreParagraph,
};

<EditorBlocksRenderer
	editorBlocks={ editorBlocks }
	blockDefinitions={ blockDefinitions }
/>;

Included Block Components

These components provide developer-friendly APIs for rendering core WordPress blocks. If a WordPress block does not have a corresponding component, it will fallback to the Default block component, which uses html-react-parser under the hood.

| Type | Component | | ------------------ | ---------------- | | core-audio | CoreAudio | | core-button | CoreButton | | core-buttons | CoreButtons | | core-code | CoreCode | | core-column | CoreColumn | | core-columns | CoreColumns | | core-cover | CoreCover | | core-details | CoreDetails | | core-file | CoreFile | | core-freeform | CoreFreeform | | core-gallery | CoreGallery | | core-group | CoreGroup | | core-heading | CoreHeading | | core-html | CoreHtml | | core-image | CoreImage | | core-list | CoreList | | core-list-item | CoreListItem | | core-media-text | CoreMediaText | | core-paragraph | CoreParagraph | | core-post-content | CorePostContent | | core-preformatted | CorePreformatted | | core-pullquote | CorePullquote | | core-quote | CoreQuote | | core-separator | CoreSeparator | | core-spacer | CoreSpacer | | core-template-part | CoreTemplatePart | | core-verse | CoreVerse | | core-video | CoreVideo | | default | Default |

Known Limitations

Work is ongoing for full feature parity with Gutenberg, in particular around Block Supports and certain aspects of the Interactivity API. The following functionality is coming soon:

  • Duotone Filters
  • Image Lightboxes
  • @todo

Contributing

This package is part of SnapWP's monorepo and is actively maintained by rtCamp. Packages are published to npm from the packages directory, and can be used standalone in the headless WordPress ecosystem or as part of SnapWP's framework.

Contributions are welcome and encouraged! To learn more about contributing to this package or SnapWP as a whole, please read the Contributing Guide.

For development guidelines, please refer to our Development Guide.

Want to expand what's possible with WordPress?