FeaturesEmails
PreviousNext

Email Templates

Premade templates for emails to make your brand more professional.

Usage

Make sure the package is installed.

pnpm add '@kit/email-templates@workspace:*'

Render the template that you want.

import { renderWelcomeEmail } from '@kit/email-templates';
 
const { html, subject } = await renderWelcomeEmail({
    appConfig: appConfig,
    name: 'John Doe',
});

Send the email.

Check the email index documentation to see how to send the email.

Supabase templates

As said in the supabase documentation, supabase use the following templates for authentication.

TemplateDescription
Confirm signupEmail sent to the user to confirm their signup.
Invite userEmail sent to the user to invite them to the project.
Magic LinkEmail sent to the user to sign in to the project.
Change Email AddressEmail sent to the user to confirm their email change.
Reset PasswordEmail sent to the user to reset their password.

Email structure

All email templates follow a common structure:

  • Header component at the top of each email, containing the application logo and branding
  • Footer component at the bottom of each email, containing legal information and unsubscribe links

This consistent structure ensures a professional appearance across all your email communications.

Tailwind configuration

Located in the kit/email/email-templates/tailwind.email.config.ts file.

TailwindConfig

PropTypeDefault
important
Partial<ImportantConfig>
prefix
string
separator
string
safelist
SafelistConfig[]
blocklist
string[]
presets
Partial<Config>[]
future
Partial<FutureConfig>
experimental
Partial<ExperimentalConfig>
darkMode
Partial<DarkModeConfig>
theme
Partial<CustomThemeConfig & { extend: Partial<CustomThemeConfig>...
corePlugins
Partial<CorePluginsConfig>
plugins
(PluginCreator | { handler: PluginCreator; config?: Partial<Config>; } | { (options: any)...

Font configuration

Located in the kit/email/email-templates/tailwind.email.config.ts file.

The config font object allows you to load fonts to use in your emails.

FontConfig

PropTypeDefault
fontFamily*
string
fallbackFontFamily*
FallbackFont |...
webFont
{ url: string; format:...
fontStyle
Property.FontStyle
fontWeight
Property.FontWeight

Email templates

Welcome Email

Used to welcome new users to your application. Use renderWelcomeEmail to render this template.

WelcomeEmailProps

PropTypeDefault
appConfig*
{ description: string;...
name*
string

Confirm Email Address

Used to verify a user's email address during registration. Use renderConfirmEmailAddressEmail to render this template.

ConfirmEmailAddressEmailProps

PropTypeDefault
appConfig*
{ description: string;...
name*
string
verificationLink*
string

Invite User

Used to invite users to join an organization. Use renderInviteUserEmail to render this template.

InviteUserEmailProps

PropTypeDefault
appConfig*
{ description: string;...
name*
string
inviteLink*
string

Password Reset Email

Used to send password reset links to users. Use renderResetPasswordEmail to render this template.

ResetPasswordEmailProps

PropTypeDefault
appConfig*
{ description: string;...
resetPasswordLink*
string

Confirm Changed Email Address

Used to confirm when a user wants to change their email address. Use renderConfirmChangeEmailAddressEmail to render this template.

ConfirmChangeEmailAddressEmailProps

PropTypeDefault
appConfig*
{ description: string;...
confirmLink*
string
newEmail*
string

Revoked Invitation Email

Used to notify users when their invitation to an organization has been revoked. Use renderRevokedInvitationEmail to render this template.

RevokedInvitationEmailProps

PropTypeDefault
appConfig*
{ description: string;...
organizationName*
string

User Delete Email

Used to confirm user account deletion requests. Use renderUserDeleteEmail to render this template.

UserDeleteEmailProps

PropTypeDefault
appConfig*
{ description: string;...

How is this guide?

Last updated on 10/17/2025