Skip to content

HTML

Wraps the email document with a root element

Install

Install the component from your command line

Terminal window
pnpm add jsx-email

Usage

HtmlExample.jsx
import { Body, Head, Html } from 'jsx-email';
const Email = () => {
return (
<Html lang="en" dir="ltr">
<Head>
<title>Email Title</title>
</Head>
<Body>
Email content
</Body>
</Html>
);
};

Props

Optional Props

dir

dir?: string;

Text direction for email content.

lang

lang?: string;

Language identifier for email content.

enableVML

enableVML?: boolean;

Controls VML namespace attributes. Defaults to true.

Additional Props

This component expresses all of the Common Component Props for ComponentProps<'html'>.