This feature is implemented with the @kit/email-templates
package.
Usage
Make sure the package is installed.
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.
Template | Description |
---|---|
Confirm signup | Email sent to the user to confirm their signup. |
Invite user | Email sent to the user to invite them to the project. |
Magic Link | Email sent to the user to sign in to the project. |
Change Email Address | Email sent to the user to confirm their email change. |
Reset Password | Email 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.
In the templates, we use the AppConfig
object to get the application logo and branding.
Tailwind configuration
Located in the kit/email/email-templates/tailwind.email.config.ts
file.
TailwindConfig
Prop | Type | Default |
---|---|---|
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
Prop | Type | Default |
---|---|---|
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
Prop | Type | Default |
---|---|---|
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
Prop | Type | Default |
---|---|---|
appConfig* | { description: string;... | |
name* | string | |
verificationLink* | string |
Invite User
Used to invite users to join an organization. Use renderInviteUserEmail
to render this template.
InviteUserEmailProps
Prop | Type | Default |
---|---|---|
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
Prop | Type | Default |
---|---|---|
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
Prop | Type | Default |
---|---|---|
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
Prop | Type | Default |
---|---|---|
appConfig* | { description: string;... | |
organizationName* | string |
User Delete Email
Used to confirm user account deletion requests. Use renderUserDeleteEmail
to render this template.
UserDeleteEmailProps
Prop | Type | Default |
---|---|---|
appConfig* | { description: string;... |
Setup the SMTP provider you want to use.
Add an onboarding process after registration to collect more data on your new users and to perform specific actions.
How is this guide?
Last updated on 10/17/2025