-
Notifications
You must be signed in to change notification settings - Fork 4
React Email Docs
React Email allows you to create pretty email templates using React JSX.
To preview the development server, you can use
just email-dev
or if you would like to run the dev server manually:
cd email && pnpm email dev
- Use this base HTML component:
<Html
style={{
fontFamily:
"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
}}
>
// your email template here
</Html>-
Use Tailwind instead of
styleprops or CSS files. -
All prop input elements must have an
idwith the following format:input-inputName-target. For example:input-verifyUrl-hreforinput-verificationCode-text.
Traditionally, React Email requires Node.js (or the web using polyfills) in order to use the render function, which converts the JSX and it's props into an HTML string:
import { MyTemplate } from './email';
import { render, pretty } from '@react-email/render';
const html = await pretty(await render(<MyTemplate />));
console.log(html);Instead, we use the React Email CLI to export the templates as regular HTML files. These files are then copied into the static directory of our backend, after which the backend will handle the implementation from there (read about it here)
- Home
- Setup
- Developer Commands
- Secrets
- Technical Docs
- Feature Docs
- CI Commands
- Contributing
- Codebloom ↗
- Codebloom - Swagger Documentation ↗
- Codebloom - Staging ↗
- Codebloom - Staging - Swagger Documentation ↗
- Codebloom - Local - Swagger Documentation ↗
- Codebloom - Local - Prometheus Metrics ↗
- Grafana Dashboard - Separate domain
- Public Taskboard (Read-only) ↗