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

@matthiaskrijgsman/mat-builder

v0.3.0

Published

Headless-first React drag-and-drop block builder: document model, undo/redo, Pragmatic drag and drop, and composable editor UI. Ships an email builder preset.

Readme


You define blocks; mat-builder provides the document model, undo/redo, drag and drop, and the editor UI around them.

  • One component to start. <EmailBuilder> is a complete editor: canvas, palette, inspector, layers panel, undo/redo, saving, and a live preview.
  • Headless underneath. Every part is exported. Bring your own blocks with defineBlock or compose, or your own layout with BuilderProvider.
  • Email that ships. A server-safe renderEmail produces table-based HTML through react-email, with merge tags, conditional blocks, and every URL and style value sanitized.

Built with React 19, Tailwind CSS v4, Pragmatic drag and drop, and mat-ui.

Install

npm install @matthiaskrijgsman/mat-builder \
  react react-dom @matthiaskrijgsman/mat-ui \
  lexical @lexical/react @lexical/rich-text @lexical/selection @lexical/utils @lexical/link @lexical/list \
  react-email @react-email/render

The last two are needed by /email and /email/render; only a consumer using the root entry with its own block set can skip them. Why each package is a peer is explained in Getting started.

Quick start

import "@matthiaskrijgsman/mat-ui/style";        // on Tailwind v3 or no Tailwind: the `/style-flat` entries instead
import "@matthiaskrijgsman/mat-builder/style";
import { EmailBuilder } from "@matthiaskrijgsman/mat-builder/email";

<EmailBuilder
  className="h-screen"
  defaultValue={template}                    // omit to start a blank email
  onSave={(document) => api.save(document)}  // Save button + ⌘S; add autoSaveMs to autosave
  blocks={[myCustomBlock]}                   // optional, merged into the email preset
/>;

Render it on the server, or anywhere without a bundler:

import { renderEmail } from "@matthiaskrijgsman/mat-builder/email/render";

const { html, text } = await renderEmail(document, { values, substituteTokens: true });

Documentation

| Guide | Covers | |---|---| | Getting started | install, the stylesheets, first builder, saving, rendering | | Custom blocks | primitives, composed blocks, patterns | | Server rendering | renderEmail, personalization, conditional blocks | | Theming | tokens, dark mode, the theme prop | | API reference | every export, by level of control |

The architecture and its rationale live in docs/. The package is on 0.x; breaking changes are listed in the changelog.

Development

pnpm install
pnpm dev:watch   # rebuild the library on change
pnpm site        # playground on http://localhost:6007
pnpm test        # unit tests
pnpm test:pack   # clean-room consumer smoke test
pnpm build       # library build + type declarations

site/ is the Next.js playground and the live demo; it consumes dist/ through the workspace. CI runs everything above on every push.

License

MIT © Matthias Krijgsman