The React Email editor is an open-source visual editor that lets your users author email templates inside your own product. It ships with bubble menus, slash commands, an Inspector sidebar, and extensible nodes. It also exports email-ready HTML you can hand straight to Resend. This guide walks through embedding the editor in a React app, styling it to match your brand, customizing the Inspector Sidebar, and adding your own custom node.Documentation Index
Fetch the complete documentation index at: https://resend.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A React 18+ application (Vite, Next.js, Remix, etc.)
- A bundler with package exports support (the defaults for the frameworks above)
Install the editor
Install The bundled theme covers the bubble menus, slash commands, and Inspector. If you only use a subset, you can import individual stylesheets instead.
@react-email/editor and import the bundled theme stylesheet once at your app root.app/layout.tsx
Mount the base editor
The fastest path is the standalone
EmailEditor component. It comes with the default extensions, bubble menus, slash commands, and theming wired up.app/components/Editor.tsx
content accepts an HTML string or a TipTap JSON document. See the EmailEditor API reference for the full prop list.Style the editor
The editor exposes two layers of styling:The default theme also responds to
- Editor chrome (bubble menus, slash command palette, Inspector controls) — driven by CSS custom properties (
--re-*) anddata-re-*attribute selectors. - Editor content (what the user is typing) — uses TipTap’s
.tiptaproot class. Note that styling here only affects the in-editor preview; the exported HTML is styled by the theming system.
app/styles/editor.css
prefers-color-scheme: dark and to a .dark class on any ancestor — so it works with libraries like next-themes out of the box. See the Styling reference for the complete list of variables, data-re-* selectors, and content classes.Add the Inspector Sidebar
The Inspector is a contextual sidebar that swaps panels based on the user’s current selection — document defaults when nothing is focused, node properties when a block is selected, text formatting when text is selected.Pass See the Inspector reference for every render-prop helper, the full list of reusable section components (
Inspector.Root as a child of EmailEditor so it shares the editor’s context:app/components/Editor.tsx
Inspector.Size, Inspector.Padding, Inspector.Border, Inspector.Typography, Inspector.Background, Inspector.Link), and runnable examples.Add a custom extension
Custom blocks use
EmailNode, which extends TipTap’s Node with the renderToReactEmail method so the same node renders correctly inside the editor and in the exported email.See Custom
Extensions for
the full API and a worked example.
Send the result with Resend
If you use the standalone The ref exposes three export methods:
All three use composeReactEmail under the hood.
EmailEditor component, you can access the email HTML and plain text through ref methods. In your handler, send the HTML to Resend using the Send Email or Send Batch Emails API.| Method | Returns | Description |
|---|---|---|
getEmailHTML() | Promise<string> | Email-ready HTML |
getEmailText() | Promise<string> | Plain text version |
getEmail() | Promise<{ html, text }> | Both in a single call |
See Email Export docs
for more information on the export methods.
Next steps
React Email editor reference
The complete API surface — extensions, UI components, theming, and image
upload.
Editor styling reference
Every CSS variable and
data-re-* selector you can target.Custom extensions
Wrap existing TipTap extensions or build new email-safe nodes and marks.
Template emails with React Email
Author templates as
.tsx files and upload them to Resend with the CLI.