- A template - your content (the body, subject, and notification category), written as a React Email component.
- A theme - the shared layout and branding that wraps that content (header, footer, background, logo, unsubscribe link).
Templates
Templates are React Email components written in TSX. Each template receives the currentuser, project, and any custom variables you pass when sending.
variablesSchema- Define the shape of your template variables using arktype. Hexclave validates variables against this schema at render time.<Subject>- Sets the email subject line from inside the template.<NotificationCategory>- Declares whether this is a"Transactional"or"Marketing"email.PreviewVariables- Sample data used for the live preview in the dashboard editor.
Built-in templates
Hexclave ships with templates for common auth and payment flows. These are sent automatically when the matching event happens:
You can customize any built-in template from the dashboard under Emails → Templates.
Themes
Themes wrap your email content in a consistent layout - header, footer, background, branding. Hexclave includes three built-in themes:- Default Light - Clean white background with subtle shadow
- Default Dark - Dark background with light text
- Default Colorful - Light purple background with an accent border
themeId option, or pass themeId: false to send without any theme.
Related
- Drafts - compose in the dashboard and send with
draftId(not TSX templates). - Emails guide - start-to-finish implementation: server, templates, sending, and delivery.