Skip to main content

1. Install dependencies

Install the InkDes Email package locally and a few components.
# pnpm
pnpm add @inkdes-email/components

# npm
npm install @inkdes-email/components

# yarn
yarn add @inkdes-email/components

2. Usage

import { Font } from "@inkdes-email/components";

export default function EmailTemplate() {
  return <Font 
            family='Inter'
            url='https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZJhiJ-Ek-_EeAmM.woff2'
            type='woff2'
            fallback='Arial'
            style='normal'
            weight='400'
            targetSelectors={['body', '.inkdes-table']}
          />
}

Props

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeYesContent of the email document
familyStringYes-
urlStringYes-
typeStringYes“woff2” or “woff”
styleStringYes-
weigthStringYes400
targetSelectorsArray of css selector stringsNo
All other standard Head attributes for the <head> element are supported.
I