Installation
Usage
Add the component to your email template inside the<Head> component.
Props
The font you want to use. Note: Do not insert multiple fonts here, use
fallbackFontFamily for thatFallback font(s) to use when the primary font is unavailable. Can be a single font or an array (order determines priority)
Web font configuration for loading custom fonts. Not all email clients support web fonts - check caniemail.com for support
url(string): The URL to the font fileformat(FontFormat): The font format (e.g.,"woff","woff2","truetype", etc.)
The font style (e.g.,
"normal", "italic")The font weight (e.g.,
400, 700, "bold")Fallback Font Options
The following fallback fonts are supported:ArialHelveticaVerdanaGeorgiaTimes New Romanserifsans-serifmonospacecursivefantasy
Font Format Options
woffwoff2truetypeopentypeembedded-opentypesvg
Example with Multiple Fallbacks
Important Notes
Not all email clients support web fonts. For clients that don’t support them, the fallback font will be used instead. Always test your emails across different clients.
TypeScript
Email Client Support
This component was tested using the most popular email clients.| Gmail | Apple Mail | Outlook | Yahoo! Mail | HEY | Superhuman |
|---|---|---|---|---|---|
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |