Prerequisites
React Email requires Node.js 20.0.0 or higher and works with React 18+ or React 19+.
- Node.js 20.0.0 or higher
- A package manager (npm, yarn, or pnpm)
- React 18+ or React 19+ in your project
Quick Start with CLI
The fastest way to get started is with thecreate-email CLI tool:
emails folder with example email templates and sets up the development environment.
Install Component Library
To add React Email to an existing project, install the components package:The
-E flag is recommended to install exact versions and avoid potential compatibility issues:What’s Included
The@react-email/components package includes all React Email components in one convenient package:
Layout Components
Layout Components
- Html - Root email component
- Head - Email head section
- Body - Email body wrapper
- Container - Center content with max-width
- Section - Group elements together
- Row & Column - Grid layout system
Content Components
Content Components
- Text - Paragraph text
- Heading - Headings (h1-h6)
- Button - Styled link button
- Link - Hyperlinks
- Img - Images
- Hr - Horizontal divider
Advanced Components
Advanced Components
- Preview - Email preview text
- Font - Custom font loading
- CodeBlock - Syntax highlighted code
- CodeInline - Inline code
- Markdown - Render markdown content
- Tailwind - Tailwind CSS support
Utilities
Utilities
- render - Convert React to HTML
Install Individual Packages
You can also install components individually if you prefer a smaller bundle:Install the Render Package
The render package converts React components to HTML. It’s included in@react-email/components, but can be installed separately:
The render package works across multiple environments including Node.js, Edge runtimes (Vercel, Cloudflare Workers), Deno, and browsers.
Install Development Tools
For local development with live preview, install the React Email CLI:CLI Commands
Start the development server with live preview
Export emails to static HTML files in an
out directoryPeer Dependencies
React Email requires React and React DOM as peer dependencies:Verify Installation
Create a simple test file to verify everything is working:emails/test.tsx
If installation was successful, you should see your email in the browser at
http://localhost:3000TypeScript Support
React Email is built with TypeScript and includes type definitions out of the box. No additional@types packages are needed.
Next Steps
Quickstart Guide
Build your first email template with React Email
Component Reference
Explore all available components and their props