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 { Text } from "@emailux/components";

export default function EmailTemplate() {
  return <Text spacing='10px' fontWeight='400' fontFamily='Arial' fontSize='20px'>
  Hello world!
  </Text>;
}

Props

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeYesContent of the email document
colorstringNo#000
fontSizestringNo
fontWeightstringNo
lineHeightstringNo
fontFamilystringNo
classNamestringNo
dir”ltr” | “rtl”NoComes from wrapping Html component’s dir context prop which is ltrText direction for the wrapper cell
spacingstringNoComes from wrapping Html component’s defaultSpacing context prop which is 20pxSpacing bottom, by default comes from Html defaultSpacing prop
styleReact.CSSPropertiesNo
plainbooleanNofalseUsed when you don’t want to use table or margin bottom just a paragraph without spacing
letterSpacingstringNo
inlinebooleanNofalseUsed when you want to write something in one line inside another component without spacing
hrefstringNo-If you want to convert the text to link
paddingCSS padding style stringNo""Only works if its either inline or plain and you can add a css string
All other standard attributes for the <text> element are supported.