PageKit — the self-hosted GrapesJS site builder, sold as source. Get early access

React email builder

Build a React Email Builder with GrapesJS

Embed a customizable visual email editor into your React or Next.js application. Let your users create responsive email templates with reusable blocks, custom components and MJML or HTML export — while your product keeps its own users, data and sending infrastructure.

Open source core (BSD-3-Clause)React-ready (@grapesjs/react, MIT)Self-hostedExtensible

Build a custom email builder

26k+

GitHub stars on the editor core

1.4M+

npm downloads a month

100+

Plugins and presets on GJS.Market

BSD-3-Clause

Licence of the editor core

Why this page

Four things a React team actually needs

Not a hosted editor you rent, and not a template gallery. An editing layer you mount inside the application you already run.

React

The editor mounts as a component in your tree. Your router, your providers and your auth context still wrap it, and its state flows back into React like any other component's.

Visual

Your users assemble emails by picking blocks and editing text where it sits, instead of describing a layout to a developer or fighting table markup by hand.

Extensible

Components, blocks, panels and commands are all yours to define. The parts of the editing experience that are specific to your product can be written by you.

Your infrastructure

Templates are saved through your own API to your own database, and sent by whichever provider you already pay for. Nothing here calls an editor service at runtime.

Try it

See a React email builder in action

This canvas is a React component running on this page — no editor bundle, no iframe. Add a block, click any section to select it, retype the text in place, restyle it, reorder it, and switch the preview between desktop, tablet and mobile. Open the HTML tab to see the kind of markup an email builder hands back to your code.

app.yourproduct.com/emails/new

Blocks

Add a section to the email.

Click a section to select it, then edit or restyle it

YOUR PRODUCT
Your release is live
Drop a screenshot in, write a sentence under it, and the section is done. Your users never touch the table markup underneath.
Open the changelog

Selection

Nothing selected

Click a section in the canvas, or add one from the Blocks panel.

The real editor

Load the actual GrapesJS editor

Nothing below loads until you ask for it: there is no iframe in this page's HTML, and only one demo is mounted at a time. These are public demos hosted by their authors.

Open in a new tab

The newsletter preset: email-safe blocks, a restricted style manager and table-based output. This is the closest thing to what your users would see.

grapesjs.com/demo-newsletter-editor.htmlFree

Nothing is requested until you click. The editor then loads in an iframe from its own site.

Definition

What is a React email builder?

A React email builder is a visual editor that runs inside a React application and lets users create and customise email templates without writing HTML email markup by hand. It is not a separate product your users log into: it is a component in your app, so the templates, the accounts that own them and the infrastructure that sends them all stay on your side.

What passes through it

  1. React application
  2. Email builder
  3. Visual editing
  4. Responsive preview
  5. HTML / MJML
  6. Your email infrastructure

The editor's job ends at producing markup. Everything before and after it is your application.

Why bother

Why add an email builder to your React app?

In every one of these, the alternative is a developer editing a template by hand each time someone in the business wants a change.

SaaS

Let customers design their own transactional and lifecycle emails inside your product, on their own plan, without a support ticket.

CRM

Give sales and success teams a way to shape customer communications themselves, with the fields and merge tags your CRM already exposes.

Marketing automation

Build reusable templates once and reference them from every automated workflow, instead of duplicating markup per campaign step.

Newsletter platforms

Make composing an issue a design task rather than an HTML task, and let each publication keep its own look.

Ecommerce

Assemble promotional sends and order-related emails from blocks that already know how to render a product, a price and a call to action.

Internal tools

Let non-technical teams own the email content in an internal admin surface, while the developers keep the components and guardrails.

Why GrapesJS

Why build your React email editor with GrapesJS?

It is the editing foundation, not the finished product. That distinction is the point: everything below is a hook you build on rather than a feature you accept as given.

Visual editing

A full editing canvas with selection, a component tree and a style manager — the parts that take longest to write and are hardest to get right.

Custom components

Define component types with their own traits and their own markup, so the editor understands the objects your application already has.

Reusable blocks

Register your own blocks under your own categories and they appear in the block panel like any built-in one.

Responsive editing

Configure the device widths users can switch between while editing, and preview each one without leaving the canvas.

Storage APIs

Point the storage manager at your own endpoints. Loading and saving become ordinary requests against your API.

Plugins

Email presets, block packs, asset managers and storage adapters already exist, so you are not implementing every layer yourself.

Custom UI

Panels, buttons and commands are configurable, and you can drive a headless instance from your own React interface instead.

Self-hosted

The packages install from npm and ship in your bundle. There is no editor service to call at runtime and no per-seat editor account.

Architecture

How GrapesJS fits into your React application

GrapesJS provides the visual editing layer. Your React application stays in control of users, data, storage and publishing — which is the whole argument for embedding an editor rather than sending people to someone else's.

Your React application

  • Routing and layout
  • Authentication and sessions
  • Plans, seats and permissions
  • Template list and versioning
  • Send scheduling

The editor

  • Canvas and selection
  • Blocks and components
  • Style manager
  • Device widths
  • Undo / redo
  • Asset manager
  • Email presets
  • Block packs
  • Storage adapters
  • Asset integrations
Browse plugins

Your backend

  • API routes
  • Your database
  • Rendered HTML / MJML
  • Your sending provider
The editor never talks to your database, and your database never needs to know how the editor works. The only contract between them is a JSON project document and the markup it renders to.

Embedding an editor into someone else's product raises a different set of questions.

React and Next.js

Use the email builder in React or Next.js

Both paths end in the same place. The only real difference is where the module is allowed to be evaluated.

React SPA

  1. React

    Vite, CRA, Remix client route

  2. @grapesjs/react

    the published wrapper component

  3. GrapesJS

    the editing canvas

  4. Email preset

    email-safe blocks and styles

Render the component. There is nothing else to arrange.

GrapesJS React integration

Next.js

  1. Next.js

    Pages or App Router

  2. dynamic(..., { ssr: false })

    the one extra line

  3. React component

    your editor wrapper

  4. GrapesJS

    browser only

  5. Email preset

    email-safe blocks and styles

Everything else — API routes, data fetching, auth — is unchanged.

GrapesJS Next.js integration

The SSR boundary, once

GrapesJS reaches for window and document while it initialises, so it cannot be evaluated on the server. In Next.js that means importing your editor component through next/dynamic with ssr: false and giving it a loading skeleton. That is the entire Next.js-specific cost; the page around the editor can still be server-rendered, and its data can still come from getStaticProps, getServerSideProps or a server component.

Quick start

Start building a React email builder

Three packages and a component. Everything after this — storage, custom blocks, MJML — is covered further down the page.

npm install grapesjs @grapesjs/react grapesjs-preset-newsletter
EmailBuilder.jsxJS
import GjsEditor from '@grapesjs/react';
import newsletter from 'grapesjs-preset-newsletter';
import 'grapesjs/dist/css/grapes.min.css';

// A normal React component. The editor is a child of your tree, so your
// router, your auth context and your providers all still wrap it.
export default function EmailBuilder({ template, onSave }) {
  return (
    <GjsEditor
      options={{
        height: '100vh',
        // Storage is wired to your own API further down this page.
        storageManager: false,
        plugins: [newsletter],
        projectData: template,
      }}
      onEditor={(editor) => {
        // Everything the user builds comes back out as plain data you can
        // put straight into React state or POST to your backend.
        editor.on('update', () => {
          onSave({
            html: editor.getHtml(),
            css: editor.getCss(),
            project: editor.getProjectData(),
          });
        });
      }}
    />
  );
}

In Next.js, one dynamic import keeps the editor out of the server render:

app/emails/page.tsxJS
// app/emails/page.tsx  (or pages/emails.tsx)
import dynamic from 'next/dynamic';

// GrapesJS reaches for window/document as it initialises, so it can only run
// in the browser. In Next.js that means one dynamic import with ssr: false —
// this is the whole of the Next.js-specific work.
const EmailBuilder = dynamic(() => import('@/components/EmailBuilder'), {
  ssr: false,
  loading: () => <EditorSkeleton />,
});

export default function EmailsPage({ template }) {
  return <EmailBuilder template={template} onSave={saveTemplate} />;
}
  1. Initialise the editor inside a React component
  2. Add an email preset so the blocks and styles are email-safe
  3. Register the blocks your product needs
  4. Configure storage against your own API
  5. Export HTML, or compile MJML on the server
  6. Hand the result to your sending provider

Versions above were checked against the published packages on 2026-09-03: grapesjs 0.23.6 is BSD-3-Clause; @grapesjs/react is MIT.

Editor features

Everything you need for visual email editing

These come from the editor core and its email presets, not from anything you have to write.

Drag and drop

Users move sections around the email and drop new ones in from the block panel.

Rich content

Text, images and buttons are edited where they sit, with the inline editor swappable for one you already license.

Layouts

Rows, columns and sections, built out of the table markup email clients expect rather than modern layout CSS.

Responsive design

Switch between configured device widths while editing so a layout can be checked narrow before it is sent.

Reusable components

Component types you define, with their own traits and their own rendered markup.

Blocks

A palette of ready sections your users assemble from, grouped into categories you name.

Assets

An asset manager for images, which plugins can point at your own storage or a media service you already use.

Undo / redo

A command history, so experimenting with a design is not a one-way door.

MJML

Build responsive emails with MJML

MJML exists to make responsive email markup writable by hand. A visual builder on top of it means nobody has to. GrapesJS does not include MJML in its core — a plugin adds MJML components to the editor, so the project serialises to MJML rather than to plain HTML.

Where the compile happens

  1. React app
  2. GrapesJS + MJML plugin
  3. MJML document
  4. Your API route
  5. HTML email
  6. Your sending provider
pages/api/email/compile.ts
// pages/api/email/compile.ts
//
// mjml is a Node package — it parses and renders on the server, not in the
// browser. So the editor produces MJML in the client and this route turns it
// into the table-based HTML that email clients actually accept.
import mjml2html from 'mjml';

export default function handler(req, res) {
  const { html, errors } = mjml2html(req.body.mjml, {
    validationLevel: 'soft',
    keepComments: false,
  });

  // MJML reports what it could not understand rather than failing silently.
  if (errors.length) console.warn('[mjml]', errors);

  res.status(200).json({ html });
}

The compiler is a Node package, so compilation belongs on the server — in Next.js, an ordinary API route. The reverse direction is not symmetrical: arbitrary HTML does not convert cleanly back into MJML, so pick the format your workflow needs before you build on one.

Output

Control your email output

The editor hands your code three different things, and a React application usually wants all three at different moments.

editor.getHtml() + getCss()

HTML

The rendered email, table-based and inline-styled when an email preset is active. This is what you pass to a sending provider.

with the MJML plugin

MJML

The source document, when your workflow is built around MJML. Compile it on the server to get the HTML you actually send.

editor.getProjectData()

JSON

The editable project. Store it so a user can reopen a template months later and it comes back exactly as they left it.

Rendered markup and editable project are different artefacts with different lifetimes. Store the JSON; regenerate the HTML.

Custom components

Turn the data your app already has into email blocks

This is where an embedded builder pulls ahead of a generic email tool: the blocks can know about your domain. A block is not a picture of a product card — it can look the product up.

Your application

Email builder

  • ProductProduct blockimage, name and price pulled from the record
  • CustomerPersonalised greetingmerge fields your backend resolves at send time
  • OrderOrder summary blockline items rendered as an email-safe table
  • EventDynamic call to actiona link built from the event, not typed by hand
  • PlanPricing blocktiers rendered from your billing catalogue

To be precise about what this is: an arbitrary React component is not converted into an email component. JSX renders a DOM tree, and email clients will not honour most of it. What you write is a GrapesJS component type whose toHTML emits email-safe markup and whose traits map onto a record your application owns. The wiring is yours; the editor supplies the place to put it.

Block library

Give users a library of ready-to-use email blocks

Reduce repetitive design work by shipping the sections your product actually sends, rather than a generic set your users have to adapt every time.

Header

Logo, wordmark and preheader text, locked to the layout your brand guidelines specify.

Hero

The one message the email exists to deliver, sized to survive a narrow viewport.

Image + text

The workhorse section: a visual with a paragraph under or beside it.

Product card

A domain block wired to your catalogue rather than a placeholder someone fills in.

Pricing

Tiers and figures rendered from your billing data, so a price change is not a template edit.

Features

A repeatable list of points, laid out with tables so it survives Outlook.

Call to action

A bulletproof button with the padding and fallbacks each client needs.

Footer

Address, preferences and unsubscribe — the parts compliance cares about, kept out of the user's hands.

Templates

Start from a ready-made email

A template is just a saved project document, so shipping a starter library means seeding rows and loading one as projectData when a user picks it. These are the categories most products end up needing:

Common starting points

  • Newsletter
  • Welcome
  • Promotion
  • Product announcement
  • Ecommerce
  • SaaS lifecycle
  • Transactional

These are layout categories, not products for sale. GJS.Market lists email presets, block packs and template managers — it does not sell ready-made email designs, and this page will not show you cards for products that do not exist.

Responsive

Design for desktop and mobile

Users switch device width while editing, and the canvas re-lays out at that width. Email widths are narrower than web ones: 600px has been the safe desktop maximum for years.

Desktop600px
Tablet480px
Mobile320px

What users can change per width

  • Font size
  • Padding
  • Alignment
  • Column stacking
  • Image width
  • Section visibility

A preview is a preview. It shows how the markup reflows, not how a specific client will render it — which is the next section.

Email clients

Build with real email clients in mind

Email clients implement HTML and CSS differently, and have done for twenty years. A visual builder standardises the authoring workflow; it does not make the clients agree with each other.

Gmail

Strips the document head in several contexts, so styles that must survive have to be inline.

Outlook

Renders through Word on Windows in some versions, which is why email markup is still table-based.

Apple Mail

The most permissive of the four, and therefore the least useful as your only test.

Yahoo Mail

Its own handling of media queries and classes; worth checking if it is meaningful in your audience.

Which is why this page will not tell you it works perfectly everywhere. Table-based output with inline styles is the most predictable starting point available, and production emails should still be tested in the clients your own recipients actually use.

Your data

Keep your email data in your own backend

Connect the editor to the backend and data model you already have. Your users, your authentication, your database, your permissions and your publishing workflow all stay exactly where they are.

The round trip

  1. React email builder
  2. Project data (JSON)
  3. Your API route
  4. Your database
  5. Your application
storage + pages/api/email-templates/[id].tsJS
// The editor asks your API for a template and hands it back on save.
// Your users, your auth, your database, your permissions — unchanged.
const options = {
  storageManager: {
    type: 'remote',
    autosave: true,
    stepsBeforeSave: 5,
    options: {
      remote: {
        urlStore: `/api/email-templates/${templateId}`,
        urlLoad: `/api/email-templates/${templateId}`,
        // Your existing session cookie is all the auth it needs.
        fetchOptions: { credentials: 'include' },
      },
    },
  },
};

// pages/api/email-templates/[id].ts — an ordinary Next.js route handler.
export default async function handler(req, res) {
  const session = await getSession(req);
  if (!session) return res.status(401).end();

  if (req.method === 'POST') {
    await db.emailTemplate.update({
      where: { id: req.query.id, orgId: session.orgId },
      data: { project: req.body },
    });
    return res.status(200).json({ ok: true });
  }

  const row = await db.emailTemplate.findFirst({
    where: { id: req.query.id, orgId: session.orgId },
  });
  return res.status(200).json(row?.project ?? {});
}

GJS.Market does not host your templates, store your data or send your email. It sells plugins for an editor you run yourself.

White label

Make the email builder part of your product

Customise the editing experience until it reads as a native part of your React application rather than a third-party panel bolted into it. There is no vendor branding to remove in the first place.

What the user sees

  1. Your brand
  2. Your navigation
  3. Your email builder
  4. Your components
  5. Your templates

What you can change

  • Toolbar and buttons
  • Panels and their layout
  • Block palette and categories
  • Component types and traits
  • Style manager sectors
  • Commands and keyboard shortcuts
  • The surrounding React UI

The most thorough version is to run the editor headless and build the entire interface in React yourself, using the editor only for the canvas and the model.

Build vs buy

Build a React email editor from scratch?

It is a reasonable thing to consider, right up until the list of parts is written down. Every item below is something an email editor needs before it is usable — not a nice-to-have.

What an email editor is made of

  • Editing canvas
  • Selection and hit testing
  • Drag and drop
  • Component model
  • Block system
  • Style manager
  • Responsive controls
  • Asset manager
  • Template storage
  • Undo / redo history
  • Serialisation
  • HTML export
  • MJML integration
  • Preview
  • Ongoing maintenance

Build everything yourself

Every row above

  • You own each subsystem, including the boring ones
  • Email client quirks become your team's permanent problem
  • The editor competes for roadmap with your actual product
  • Nobody else's plugins can help you

Start with GrapesJS

The editing foundation

  • Canvas, components, blocks, styles, assets and storage exist
  • Email presets already encode the table-based output rules
  • Plugins cover storage, assets and export
  • You write only the parts that are specific to your product

Build your email product — not another editor from scratch. We are not going to put a number of saved months on that; how long it would take your team depends on your team.

Plugins

Extend your React email builder with GJS.Market

Every listing below is a real product with a live page, and its name, price and thumbnail render straight from the catalogue — so nothing on this page can drift out of sync with what is actually for sale.

Export

Getting the finished markup out of the editor and into whatever comes next in your pipeline.

Browse this category
Stacks

Build the React email builder you need

Four combinations that map onto real requirements. Every listing shown is one that exists — there is no imaginary plugin filling a gap in a diagram.

Prices come from the catalogue at build time.

Use case

Add visual email editing to your SaaS

  1. 1
    1

    Your customer opens the builder

    A route in your app, behind your auth, on their plan. No second account, no second login.

  2. 2
    2

    They assemble a template

    From blocks you defined, including ones that know about their data in your product.

  3. 3
    3

    It saves to your database

    The project document goes through your API route and lands in a row that belongs to their organisation.

  4. 4
    4

    A campaign or workflow references it

    Your automation picks the template by id — it does not need to know how the editor works.

  5. 5
    5

    Your backend renders and sends

    Merge fields resolved at send time, markup handed to the provider you already pay for.

Customers get visual control over email content. You keep the product, the data and the delivery infrastructure.

Who this is for

Teams that end up building this

The pattern repeats across products that otherwise have nothing in common.

CRM

Reusable customer communication templates, owned by the teams who send them.

Marketing automation

Templates designed once and referenced from every step of an automated workflow.

Newsletter platforms

Campaign composition as a visual task, with each publication keeping its own identity.

Ecommerce

Promotional and order-related emails built from blocks that already know the catalogue.

Agencies and white-label

One editor, many client brands, each seeing an interface that looks like their own.

Delivery

Connect the builder to your email infrastructure

The editor creates the email. Your infrastructure sends it. Keeping that line clear is what makes the rest of this architecture simple.

  1. Stage 01

    React email builder

    The user edits; the editor serialises what they built into a project document.

    project JSON
  2. Stage 02

    Your backend

    Stores the project against the account that owns it, and renders it when something asks to send.

    API route
  3. Stage 03

    Rendered email

    Merge fields resolved, markup produced — compiled from MJML if that is your format.

    HTML / MJML
  4. Stage 04

    Your provider

    Handed to whichever sending API you already use, with its own deliverability and analytics.

    recipient
One JSON document in your database, one render step, one provider call. Nothing in that chain belongs to an editor vendor.

Examples of providers teams hand it to

  • Amazon SES
  • SendGrid
  • Mailgun
  • Postmark

Named as examples of where the markup ends up, not as built-in integrations. Neither GrapesJS nor GJS.Market ships a connector for any of them; you call their SDK from your own backend, as you already do for the rest of your email.

Comparison

React email builder: build vs hosted editor

This is an architectural trade-off, not a scoreboard. The right-hand column says "depends" honestly: hosted editors differ from each other and change their terms, and we are not going to invent a specific answer on their behalf.

CapabilitySelf-hosted GrapesJSHosted email editor
React integrationYes — @grapesjs/react wrapperDepends on the vendor
Self-hostingYes — npm packages in your bundleDepends on the vendor and plan
Data ownershipYes — your databaseDepends on the vendor
Custom componentsYes — your own component typesDepends on the vendor
Custom UIYes — panels or a headless instanceDepends on the vendor
Plugin ecosystemYes — 100+ on GJS.MarketDepends on the vendor
Your own backendYes — your API routesDepends on the vendor
Core licenceBSD-3-ClauseProprietary
Vendor lock-inLower — the project data is yoursPotentially higher

GrapesJS column verified against grapesjs 0.23.6 and @grapesjs/react on 2026-09-03. For a comparison against a specific named vendor, with its published pricing, see the dedicated page.

Custom development

Don't want to build the integration yourself?

Get help building a production-ready React email builder around your product requirements — your components, your data model, your storage and your sending provider.

Build a custom email builder

Send a brief describing your stack, your data model and the output format you need, and you get a scoped proposal back.

FAQ

React email builder questions

Related

Build your React email editor. Own the experience.

Neighbouring pages that take the same editor in a different direction.

Get started

Build the React email builder your product needs

Start with GrapesJS, integrate it into your React application, and extend the editor with the email plugins your product actually requires.

Free

Start building

Install the packages, mount the component and have an email editor running in your app today.

Quick start
Marketplace

Browse email plugins

Presets, block packs, storage adapters and asset integrations — real listings with live prices.

Browse plugins