HTML

Wraps the email document with a root element

pnpm
aube
bun
npm
yarn
pnpm add jsx-email

Usage

Add the component to your email template. Include styles where needed.

import { Button, Html } from 'jsx-email';

const Email = () => {
  return (
    <Html lang="en" dir="ltr">
      <Button href="https://example.com" style={{ color: '#61dafb' }}>
        Click me
      </Button>
    </Html>
  );
};

Component Props

lang?: string;

Identify the language of text content on the email

dir?: string;

Identify the direction of text content on the email

enableVML?: boolean;

This is used the xmlns:o and xmlns:v attributes to the html element for maximum VML compatibility Default value is true

Tips

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