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

react-email-studio

v3.4.0

Published

Visual React email editor: JSON design in/out; HTML for preview.

Downloads

851

Readme

react-email-studio

Visual email editor for React — drag-and-drop layouts and blocks, rich text, images, buttons, tables, and more. Designs save as JSON (email_document); use jsonToHtml() to generate HTML for preview and your ESP (SendGrid, SES, Mailgun, …).

npm License: MIT

Release notes

Version history and migration hints: CHANGELOG.md (also included in the published npm tarball under node_modules/react-email-studio/CHANGELOG.md).


Features

  • Multi-column layout rows and content blocks (heading, text/HTML, image, button, link, divider, spacer, social, video, menu, timer, table, nested layouts)
  • Page & content backgrounds (solid, gradient, image), responsive preview
  • Undo / redo, zoom, device preview modal
  • Internationalized UI strings (en, fr, de, es)
  • Template placeholders (e.g. {{first_name}}) can be typed directly in HTML / text blocks
  • Tree-shakeable ESM + CJS, TypeScript types

Installation

npm install react-email-studio
pnpm add react-email-studio
yarn add react-email-studio

Peer dependencies

Install these in your application (versions should satisfy peerDependencies in this package):

react, react-dom, lucide-react, and TipTap v3 (@tiptap/react, @tiptap/core, @tiptap/starter-kit, @tiptap/extension-link, @tiptap/extension-placeholder, @tiptap/extension-text-align, @tiptap/extension-text-style, @tiptap/extension-underline).


Quick start

import { useRef } from "react";
import {
  ReactEmailEditor,
  type ReactEmailEditorRef,
  jsonToHtml,
} from "react-email-studio";

export function App() {
  const editorRef = useRef<ReactEmailEditorRef>(null);

  return (
    <>
      <button
        type="button"
        onClick={() =>
          editorRef.current?.exportJson((json) => {
            // Persist JSON (API / database)
            fetch("/api/save-email", { method: "POST", body: json });
          }, true)
        }
      >
        Save design
      </button>

      <ReactEmailEditor
        ref={editorRef}
        hideTemplates
        onReady={(api) => {
          /* api.loadJson(existingDesign); */
        }}
        onUpload={async (file) => {
          const url = await uploadToYourStorage(file); // must return a public URL
          return url;
        }}
        options={{ locale: "en" }}
      />
    </>
  );
}

// Generate HTML for sending (server or client)
const html = jsonToHtml(savedDesignJson, {
  customCSS: `/* optional extra styles */`,
});

Implement onUpload so image/video uploads return URLs your recipients can load (HTTPS recommended).


Package exports

| Export | Description | |--------|-------------| | ReactEmailEditor | Main editor component (forwardRef). | | ReactEmailEditorProps | Component props type. | | ReactEmailEditorRef | Imperative API: loadJson, exportJson. | | jsonToHtml | (design, opts?) => string — full HTML email document. | | utf8ToBase64, base64ToUtf8 | Encoding helpers. | | EmailPreviewModal | Standalone responsive preview modal. | | emailPreviewDevices | Device presets for preview. | | EmailPreviewModalProps, MobilePreviewVariant | TypeScript types. | | ReactEmailEditorOptions, JsonToHtmlOptions, EmailHtmlOptions | Editor options and HTML generation options. | | EmailDocument, EmailDocumentSettings, … | JSON schema types for stored designs. |

For framework setup (Next.js client/SSR), props tables, and troubleshooting, see TUTORIAL.md.


Documentation in this package

| File | Audience | |------|----------| | USER_README.md | User guide — editor UI, workflows, options overview, troubleshooting. | | TUTORIAL.md | Integration tutorial — peers, save/load, Next.js/Vite, APIs, TypeScript. | | README.md (this file) | npm landing page — install, quick start, exports. |

Deployment (hosting, CSP, publishing), deeper integration notes, and monorepo DEPLOYMENT.md live in the source repository alongside this package—clone or browse the repo for the full file.


License

MIT