dragble-react-editor

React email builder SDK for your SaaS

dragble-react-editor is a typed React component that puts a drag-and-drop email builder inside your SaaS. Install it, pass an editor key, and your users design emails in your product — under your brand, with your auth and storage.

It is a component, not a script tag. You get a ref to the editor instance, typed props, and a sandboxed canvas that your application CSS cannot break. The same component handles email, landing page and popup modes.

Get started

Install and mount the editor

Install the package, pass an editor key, and mount the component in a container element. The editor renders inside a sandboxed iframe, so your application CSS cannot leak in and break the canvas.

Terminal

npm install dragble-react-editor

React component

import { DragbleEditor } from "dragble-react-editor";

export default function EmailEditor() {
  return (
    <DragbleEditor
      editorKey="YOUR_EDITOR_KEY"
      editorMode="email"
      minHeight="600px"
      onChange={(data) => console.log(data.design)}
      onError={(error) => console.error(error)}
    />
  );
}

What you get

Built for React products

Typed React component, not a script tag

dragble-react-editor exports DragbleEditor plus TypeScript types for the editor instance, design JSON, and event payloads. You get autocomplete on editor methods rather than a stringly-typed global.

Sandboxed iframe, no CSS collisions

The editor renders inside an isolated container, so your Tailwind, CSS modules or styled-components cannot leak into the canvas and break the design. Your users see your brand chrome around an editor that cannot be broken by your stylesheet.

A ref to the editor instance

Pass a ref and you get the editor API directly — exportHtml(), exportJson(), loadDesign(), and the rest. No postMessage plumbing on your side, no polling for readiness.

Three modes from one component

Set editorMode to email, page or popup. Email exports table-based HTML with inline CSS for inbox clients; page exports full-width HTML; popup exports a modal or an embeddable fragment.

Works with Next.js and Remix

The component mounts on the client and takes a minHeight prop so it sizes correctly inside server-rendered layouts. Use it inside a client component in the App Router.

Agent access through MCP

The same editor session can be driven by an AI agent through the MCP server, using structured tools rather than generated JSON. Useful if you want an AI copilot inside your React app.

FAQ

Questions about the React email builder SDK

Straightforward answers on SDK embedding, white-labeling, MCP agent tooling, email client compatibility, and pricing.

Install dragble-react-editor, import DragbleEditor, and pass an editor key plus editorMode="email". The component mounts the editor inside a sandboxed container. You can attach a ref to call exportHtml() or loadDesign(), and handle onChange to persist the design JSON.

Ship an editor this week

Free plan, no credit card. Email, page and popup builders from one React package.