Email Templates
@novu/framework lets you render emails with libraries you already know — React Email, Vue Email, Svelte Email — by returning the rendered HTML string from your step.email resolver.
Why use a component library?
- Reuse design tokens across product UI and emails
- Type safety for template props
- Dev-time preview with React/Vue/Svelte Email’s local preview servers
- Avoid HTML email tag soup — components abstract away
<table>-based layouts
React Email
Install
Define a template
Use in a workflow
Local preview
React Email ships its own preview dev server:Pass controls into the template
You can derive template props from controls:Remix + React Email
app/emails/:
Vue Email (Nuxt)
Install
Configure Nuxt
Define a template
Use in a workflow
Svelte Email
Install
Define a template
Use in a workflow
Tips
- Co-locate templates with workflows. Keep
src/novu/workflows/welcome/template.tsxnext tosrc/novu/workflows/welcome/index.ts. - Render synchronously when possible.
render(<Component />)is sync for React Email (returns a string). Avoid awaitingrenderunless your library requires it. - Keep template props small and serializable. Templates are pure components — pass strings/numbers/arrays, not class instances.
- Don’t fetch data in the template. Fetch in
step.customor inside thestep.emailresolver, then pass plain props. - Test in the Studio. Trigger the workflow with a sample payload — the rendered HTML appears in the Studio preview pane.
- Use the framework-specific dev server (
npx react-email dev, etc.) for fast iteration on the design without round-tripping through the Studio.