Custom fonts

Appearance

Custom fonts

Register web fonts with config.fonts and they appear in the editor's font pickers (Body settings and the Theme manager). When a font is chosen, its stylesheet is <link>ed into the exported email's <head> and the editor preview, so it actually loads. This is MailKaro's equivalent of Unlayer's fonts option.

No entitlement required. Email clients that don't support web fonts (notably Outlook on Windows) fall back to the rest of the font stack in value, always end it with a system family.

Fonts built in#

Every font picker lists the common system fonts once each, then the Google fonts Unlayer offers: Cabin, Crimson Text, Lato, Lobster Two, Montserrat, Old Standard TT, Open Sans, Pacifico, Playfair Display, Raleway, Rubik and Source Sans Pro. A design that uses one of them gets its stylesheet linked into the email head on its own (kept away from Outlook on Windows), so it shows even when the email is rendered on your server. A design opened from Unlayer keeps its own font stack.

Config#

PropTypeDefaultDescription
labelstring-Name shown in the picker (e.g. Poppins).
valuestring-The CSS font-family stack applied when chosen. End with a system fallback.
urlstring?-Stylesheet URL that loads the font (e.g. a Google Fonts href). Linked into the email + preview. Omit for a system-only stack.
tsxeditor.tsx
<EmailEditor
  config={{
    fonts: [
      {
        label: "Poppins", value: '"Poppins", Helvetica, sans-serif', url: "https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap"
      }
    ]
  }}
/>
// Drop-in (react-email-craft): pass the same array as the `fonts` prop on <EmailEditor />.
Rendering server-side with renderDesign directly? Pass the same URLs as fontImports in the render options so the <link> tags are emitted.