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

lattice-editor

v1.0.6

Published

Lattice is a feature-rich, open-source SaaS email editor based on React and MJML.

Downloads

129

Readme

Lattice

Lattice noun
A structure consisting of strips of wood or metal crossed and fastened together

Lattice is a powerful, flexible email editor component. Originally a fork of easy-email-editor, Lattice has been modernized to be fully compatible across all browsers and provides first-class support for React 19. Lattice uses MJML under the hood which is a markup language designed to represent email templates.

Demo

Development

$ git clone [email protected]:ZachGagnon1/Lattice.git

$ pnpm install
$ pnpm run install-all
$ pnpm run dev

If you need some new features, we always welcome you to submit a PR.

Usage: LatticeEditor

The core component of this library is the LatticeEditor. Below is a basic example of how to integrate it into your React 19 application.

import React, { useState } from "react";
import { LatticeEditor, IEmailTemplate } from "lattice"; // Replace with actual import path

const initialTemplate: IEmailTemplate = {
  // Add your default template JSON structure here
};

export default function App() {
  const [emailData, setEmailData] = useState<IEmailTemplate>(initialTemplate);

  // Handle image uploads inside the editor
  const handleUploadImage = async (file: Blob) => {
    // Implement your server upload logic here
    // return the hosted image URL
    return "[https://example.com/uploaded-image.png](https://example.com/uploaded-image.png)";
  };

  return (
    <div style={{ height: "100vh" }}>
      <LatticeEditor
        data={emailData}
        onChange={(values) => setEmailData(values)}
        onUploadImage={handleUploadImage}
        height="calc(100vh - 108px)"
        config={{
          showSourceCode: true,
          showBlockLayer: true,
          compact: false,
          dashed: true,
        }}
      />
    </div>
  );
}

Interesting Configurations (LatticeEditorConfig)

The LatticeEditor component accepts a config object that gives you fine-grained control over the editor's layout and tools.

  • showSourceCode (boolean): Toggles the visibility of the source code panel. Defaults to false.

  • showBlockLayer (boolean): Determines whether the block layer panel is shown. Defaults to true.

  • mjmlReadOnly (boolean): If set to true, the MJML code output panel will be read-only. Defaults to false.

  • dashed (boolean): Toggles a dashed border outline on the canvas, making it easier to visualize structural layout constraints. Defaults to false.

  • compact (boolean): Renders the editor panels in a tighter, compact view. Defaults to true.

Additional Noteworthy Props

  • onChange: Features a built-in 200ms debounce to prevent excessive re-renders while the user is actively making changes.

  • onUploadImage: If you do not provide an onUploadImage prop, Lattice will automatically strip out all "Image" blocks (Basic and Advanced) from the available components list so users don't try to use blocks they can't upload files to.

Additional Notes

  • If you want the same customizability as easy-email-editor most of the features should be available but since there is no more multi package layout you will need to change your imports to lattice
  • The Editor uses MUI components under the hood. This means that the style is fully customizable with MUI's theming capabilities. (Some things still use legacy css and also have built in styles)
  • It is possible to convert Unlayer templates using the unlayerToLattice function, it is quite basic but should cover a lot of the common cases.

License

The MIT License