System requirements
Before you begin, ensure your development environment meets these requirements:- Node.js: Version 20 or later
- React: Version 19 or later (ReactUI Email uses React 19)
- Package manager: npm, pnpm, yarn, or bun
ReactUI Email is built with Next.js 15.2+ but works with any React framework including Remix, Vite, or Create React App.
Installation methods
Using a package manager
Install the required dependencies using your preferred package manager:Core dependencies
ReactUI Email relies on these essential packages:| Package | Version | Purpose |
|---|---|---|
@react-email/components | ^0.0.32 | React Email component library |
@react-email/render | 1.0.4 | Renders React components to HTML |
react | ^19.0.0 | React library |
react-dom | ^19.0.0 | React DOM library |
Setting up your project structure
Organize your email templates in a dedicated directory:TypeScript configuration
If you’re using TypeScript, update yourtsconfig.json to include path aliases for easier imports:
tsconfig.json
Creating a render utility
Create a utility function to render your email templates to HTML:src/lib/email.ts
Installing email templates
ReactUI Email templates are available in the GitHub repository. You can copy individual templates directly into your project:Browse available templates
Visit the Templates section to see all available email templates organized by category:
- Supabase-style templates
- Notion-style templates
- Framer-style templates
- MynaUI-style templates
- And more
Copy template code
Navigate to the template you want in the source repository at:Copy the entire component code.
Paste into your project
Create a new file in your
src/emails/ directory and paste the template code:src/emails/welcome.tsx
Configuring Tailwind CSS
ReactUI Email uses Tailwind CSS for styling. Each template includes its own Tailwind configuration:Setting up email sending
To send emails, you’ll need to integrate an email service provider. Here are setup examples for popular services:Using Resend
Using Plunk
Using Nodemailer
Environment variables
Store sensitive configuration in environment variables:.env.local
Never commit your
.env files to version control. Add them to .gitignore.Previewing emails during development
For local development, you can preview emails in the browser:- Create a preview route in your Next.js app:
app/preview/email/route.tsx
- Visit
http://localhost:3000/preview/emailto see the rendered email
Troubleshooting
Common issues and solutions
TypeScript errors with React Email components
TypeScript errors with React Email components
Make sure you have the correct React types installed:Ensure your TypeScript version is 5.0 or later.
Tailwind styles not applying
Tailwind styles not applying
Each email template needs its own Tailwind configuration wrapped in the
<Tailwind> component. Make sure you’re importing it from @react-email/components.Images not loading in emails
Images not loading in emails
Use absolute URLs for all images. Email clients don’t support relative paths. Host images on a CDN or public server:
Emails look different in various clients
Emails look different in various clients
This is normal. Email clients have different rendering engines. Always test in multiple clients:
- Gmail (web and mobile)
- Outlook (desktop and web)
- Apple Mail
- iOS Mail
Next steps
Now that you have ReactUI Email installed, you can:Browse templates
Explore all available email templates
Learn customization
Customize templates to match your brand
Tailwind styling guide
Master Tailwind CSS in email templates
Sending emails guide
Learn best practices for sending emails