Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.emailux.com/llms.txt

Use this file to discover all available pages before exploring further.

1. Install dependencies

Install the EmailUX Email package locally and a few components.
# pnpm
pnpm add @emailux/components

# npm
npm install @emailux/components

# yarn
yarn add @emailux/components

2. Usage

import { Html, Head } from "@emailux/components";
import { Css } from "@emailux/css";
// Can also be imported from "@emailux/components"
// import { Css } from "@emailux/components";

export default function EmailTemplate() {
  return <Html>
  <Head>
    <Css 
      selector={['body', '.emailux-table']} 
      style={{ fontSize: '12px', lineHeight: '24px', color: '#000' }}
      />
  <Head>
</Html>

Props

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeYesContent of the email document
styleReact.CSSPropertiesYes-
selectorArray of strings of css selectorsNo
All other standard Head attributes for the <css> element are supported.