Installation

Getting started

Installation

Install one package. React and React-DOM are peer dependencies (React 18+).

bash
npm install react-email-craft
# or
pnpm add react-email-craft
# or
yarn add react-email-craft
Styles auto-inject. There's no separate CSS import, importing the package injects the editor's stylesheet once, guarded for SSR and against duplicates.

Install in three steps#

  1. Install the package. Run npm install react-email-craft, or pnpm add react-email-craft, or yarn add react-email-craft.
  2. Check your React version. React and React-DOM 18 or newer must already be in your app. They are peer dependencies.
  3. Add the server SDK if you need it. To render saved designs to email HTML on your backend, also run npm install email-craft-sdk.

Peer dependencies#

jsonpackage.json
"peerDependencies": {
  "react": ">=18", "react-dom": ">=18"
}

The package externalizes React, it uses your app's copy, so there's never a duplicate React in the bundle.

Server-side rendering (optional)#

To turn a saved design into email HTML on your backend, add the renderer. See Rendering & export.

bash
npm install email-craft-sdk

All packages on npm#

MailKaro's embeddable editors and backend SDK are published as unscoped npm packages. The old @mailkaro/* names are deprecated forwarding shims that re-export the new names. Open any package page to see its version, readme, and install command:

Next: Quick start.

Frequently asked questions#

Which versions of React are supported?
React and React-DOM 18 or newer. They are peer dependencies, so the package uses your app's copy and never bundles a second React.
Do I need to import a CSS file?
No. Importing the package injects the editor's stylesheet once, and it is guarded for server-side rendering and against duplicates.
Do I need email-craft-sdk?
Only if you want to render saved designs to HTML on your server. The editor itself needs just react-email-craft.