Skip to content

react-email

Use when building email templates with React Email — component library, styling, preview server, or rendering to HTML. Also use when creating responsive email layouts or debugging email rendering across email clients.

ModelSource
sonnetpack: email
Full Reference

┏━ 🔧 react-email ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when building email templates with React E… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Component library for building HTML emails with React. Renders to email-safe HTML. Works with any email service — Resend, Nodemailer, SendGrid, etc.

Current version: 5.x — React 19.2, Tailwind 4, dark mode, CodeBlock, Markdown, CodeInline. Install with npm install @react-email/components @react-email/render react-email.

FactValue
Components package@react-email/components
Render package@react-email/render
Preview serverreact-email (dev only)
Preview commandnpx email dev --dir emails --port 3001
Render functionawait render(<Template />) — always async
Plain texttoPlainText(html) from @react-email/render
Standard width600px container
Tailwind presetpixelBasedPreset required for correct rem→px
Docsreact.email/docs
I want to…File
Install packages, set up project structure, configure Next.js API routereference/setup.md
Use Html, Head, Body, Preview, Container, Section, Row, Column, Button, Img, Font, etc.reference/components.md
Build the standard 600px shell, use Tailwind, add MSO comments, make emails responsivereference/layouts.md
Run the preview server, set PreviewProps, enable hot reloadreference/preview.md
Call render(), integrate with Resend/Nodemailer/SendGrid, pass dynamic contentreference/render.md
Write Vitest unit tests, use Litmus/Email on Acid, run a real device checklistreference/testing.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.