Template

React Email + Better-Notify

Write email templates as React components and render them through Better-Notify. Full TypeScript support — your template props are type-checked against your notification schema.

Install

npm install @betternotify/react-email

Quick start

import { reactEmail } from '@betternotify/react-email';
import { WelcomeEmail } from './emails/welcome';

const catalog = rpc.catalog({
  welcome: rpc
    .email()
    .input(z.object({ name: z.string() }))
    .subject(({ input }) => `Welcome, ${input.name}`)
    .template(({ input }) => reactEmail(WelcomeEmail, { name: input.name })),
});

Features

Read the docsGet started

Related integrations