Team invite email
Workspace invitation with inviter, role and team preview — the email that drives viral growth.
14.4 KB · Gmail-safe
Code
import * as React from "react";
import { Avatar, Btn, Column, Eyebrow, Fallback, H1, P, Panel, Row, Shell, Small, Strong, nameOf, type TemplateProps } from "../components";
export type TeamInviteProps = TemplateProps & {
inviterName?: string;
inviterEmail?: string;
workspace?: string;
role?: string;
members?: string[];
inviteUrl?: string;
expiresInDays?: number;
};
export default function TeamInvite({
style,
brand,
inviterName = "Daniel Okafor",
inviterEmail = "daniel@northbeam.co",
workspace = "Northbeam",
role = "Editor",
members = ["Priya Raman", "Tom Lindqvist", "Ana Sousa", "Jules Martin"],
inviteUrl = "https://fieldnote.app/invite/accept?token=5be91d",
expiresInDays = 7,
}: TeamInviteProps) {
const palette = ["#3B5BFD", "#FF7A45", "#16A34A", "#9333EA", "#0EA5E9"];
return (
<Shell style={style} brand={brand} label="Invitation" preview={`${inviterName} invited you to join ${workspace} as ${role}.`}>
<Eyebrow>You're invited</Eyebrow>
<H1>Join {workspace} on {nameOf(brand)}</H1>
<P>
<Strong>{inviterName}</Strong> ({inviterEmail}) invited you to collaborate in the <Strong>{workspace}</Strong>{" "}
workspace as {role === "Admin" ? "an" : "a"} <Strong>{role}</Strong>.
</P>
<Panel pad={16}>
<Row>
{members.slice(0, 4).map((m, i) => (
<Column key={m} style={{ width: "44px" }}>
<Avatar name={m} size={36} color={palette[i % palette.length]} />
</Column>
))}
<Column style={{ paddingLeft: "6px" }}>
<Small mb={0}>
{members.slice(0, 2).join(", ")} and {members.length - 2} others are already here.
</Small>
</Column>
</Row>
</Panel>
<Btn href={inviteUrl}>Accept invitation</Btn>
<Small>This invitation expires in {expiresInDays} days.</Small>
<Fallback href={inviteUrl} />
<Small mb={0}>Not expecting this? You can ignore the email — you won't be added unless you accept.</Small>
</Shell>
);
}
TeamInvite.PreviewProps = {} satisfies TeamInviteProps;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/><meta name="color-scheme" content="light dark"/><meta name="supported-color-schemes" content="light dark"/><meta name="x-apple-disable-message-reformatting"/><meta name="format-detection" content="telephone=no,address=no,email=no,date=no,url=no"/><style>:root{color-scheme:light dark;supported-color-schemes:light dark}
body{margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}
img{border:0;outline:none;text-decoration:none;-ms-interpolation-mode:bicubic}
a{text-decoration:none}
.mb-logo-dark{display:none;max-height:0;overflow:hidden}
@media only screen and (max-width:620px){
.mb-pad{padding-left:24px !important;padding-right:24px !important}
.mb-outer{padding-left:12px !important;padding-right:12px !important}
.mb-h1{font-size:24px !important;line-height:1.2 !important}
.mb-stack{display:block !important;width:100% !important;box-sizing:border-box}
.mb-stack-gap{padding-top:12px !important;padding-left:0 !important;padding-right:0 !important}
.mb-hide-mobile{display:none !important}
.mb-full{width:100% !important;display:block !important}
}
@media (prefers-color-scheme: dark){
.mb-page{background-color:#0D0E11 !important}
.mb-card{background-color:#17181C !important;border-color:#2C2F36 !important}
.mb-subtle{background-color:#1F2126 !important;border-color:#2C2F36 !important}
.mb-border{border-color:#2C2F36 !important}
.mb-heading{color:#F4F5F7 !important}
.mb-text{color:#D5D8DE !important}
.mb-muted{color:#959AA4 !important}
.mb-ink{background-color:#F4F5F7 !important;color:#0D0E11 !important}
.mb-logo-light{display:none !important;max-height:0 !important}
.mb-logo-dark{display:block !important;max-height:none !important}
}
[data-ogsb] .mb-page{background-color:#0D0E11 !important}
[data-ogsb] .mb-card{background-color:#17181C !important}
[data-ogsb] .mb-subtle{background-color:#1F2126 !important}
[data-ogsc] .mb-heading{color:#F4F5F7 !important}
[data-ogsc] .mb-text{color:#D5D8DE !important}
[data-ogsc] .mb-muted{color:#959AA4 !important}</style></head><body class="mb-page" style="background-color:#F2F3F5;margin:0;padding:0;width:100%"><!--$--><!--html--><!--head--><!--body--><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">Daniel Okafor invited you to join Northbeam as Editor.<div> </div></div><table role="presentation" width="100%" cellPadding="0" cellSpacing="0" class="mb-page" style="width:100%;background-color:#F2F3F5;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif"><tbody><tr><td align="center" class="mb-outer" style="padding:32px 16px 48px"><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="max-width:600px;width:100%"><tbody><tr style="width:100%"><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="padding:8px 8px 24px"><tbody><tr><td><img class="mb-logo-light" alt="Fieldnote" height="32" src="https://getmailblocks.com/brand/fieldnote-logo.png" style="display:block;outline:none;border:none;text-decoration:none" width="132"/><div class="mb-logo-dark" style="display:none;max-height:0;overflow:hidden;mso-hide:all"><img alt="Fieldnote" height="32" src="https://getmailblocks.com/brand/fieldnote-logo-dark.png" style="display:block;outline:none;border:none;text-decoration:none" width="132"/></div></td></tr></tbody></table><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" class="mb-card" style="background-color:#FFFFFF;border:1px solid #E4E6EA;border-radius:14px"><tbody><tr><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody style="width:100%"><tr style="width:100%"><td class="mb-pad" data-id="__react-email-column" style="padding:40px 44px 40px"><p style="font-size:12px;line-height:16px;margin:0 0 12px;font-weight:600;letter-spacing:0;text-transform:none;color:#3B5BFD;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:12px;margin-left:0">You're invited</p><p class="mb-heading mb-h1" style="font-size:26px;line-height:1.25;margin:0 0 16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;font-weight:650;letter-spacing:-0.02em;color:#0F1115;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0">Join <!-- -->Northbeam<!-- --> on <!-- -->Fieldnote</p><p class="mb-text" style="font-size:15px;line-height:24px;margin:0 0 16px;color:#30343B;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0"><strong class="mb-heading" style="color:#0F1115;font-weight:600">Daniel Okafor</strong> (<!-- -->daniel@northbeam.co<!-- -->) invited you to collaborate in the <strong class="mb-heading" style="color:#0F1115;font-weight:600">Northbeam</strong> <!-- -->workspace as <!-- -->a<!-- --> <strong class="mb-heading" style="color:#0F1115;font-weight:600">Editor</strong>.</p><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" class="mb-subtle" style="background-color:#F6F7F9;border:1px solid #F6F7F9;border-radius:10px;margin:0 0 24px"><tbody><tr><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody style="width:100%"><tr style="width:100%"><td data-id="__react-email-column" style="padding:16px"><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody style="width:100%"><tr style="width:100%"><td data-id="__react-email-column" style="width:44px"><table role="presentation" cellPadding="0" cellSpacing="0" style="border-collapse:separate"><tbody><tr><td align="center" style="width:36px;height:36px;border-radius:18px;background-color:#3B5BFD;color:#FFFFFF;font-size:14px;line-height:36px;font-weight:600;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif">PR</td></tr></tbody></table></td><td data-id="__react-email-column" style="width:44px"><table role="presentation" cellPadding="0" cellSpacing="0" style="border-collapse:separate"><tbody><tr><td align="center" style="width:36px;height:36px;border-radius:18px;background-color:#FF7A45;color:#FFFFFF;font-size:14px;line-height:36px;font-weight:600;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif">TL</td></tr></tbody></table></td><td data-id="__react-email-column" style="width:44px"><table role="presentation" cellPadding="0" cellSpacing="0" style="border-collapse:separate"><tbody><tr><td align="center" style="width:36px;height:36px;border-radius:18px;background-color:#16A34A;color:#FFFFFF;font-size:14px;line-height:36px;font-weight:600;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif">AS</td></tr></tbody></table></td><td data-id="__react-email-column" style="width:44px"><table role="presentation" cellPadding="0" cellSpacing="0" style="border-collapse:separate"><tbody><tr><td align="center" style="width:36px;height:36px;border-radius:18px;background-color:#9333EA;color:#FFFFFF;font-size:14px;line-height:36px;font-weight:600;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif">JM</td></tr></tbody></table></td><td data-id="__react-email-column" style="padding-left:6px"><p class="mb-muted" style="font-size:13px;line-height:20px;margin:0 0 0px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:0px;margin-left:0">Priya Raman, Tom Lindqvist<!-- --> and <!-- -->2<!-- --> others are already here.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="margin:8px 0 24px"><tbody><tr><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody style="width:100%"><tr style="width:100%"><td align="left" data-id="__react-email-column"><a href="https://fieldnote.app/invite/accept?token=5be91d" style="line-height:20px;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;background-color:#3B5BFD;color:#FFFFFF;border:1px solid #3B5BFD;border-radius:8px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:15px;font-weight:600;padding:12px 22px;letter-spacing:0;text-align:center;box-sizing:border-box;padding-top:12px;padding-right:22px;padding-bottom:12px;padding-left:22px" target="_blank"><span><!--[if mso]><i style="mso-font-width:366.66666666666663%;mso-text-raise:18" hidden>   </i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:9px">Accept invitation</span><span><!--[if mso]><i style="mso-font-width:366.66666666666663%" hidden>   ​</i><![endif]--></span></a></td></tr></tbody></table></td></tr></tbody></table><p class="mb-muted" style="font-size:13px;line-height:20px;margin:0 0 12px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:12px;margin-left:0">This invitation expires in <!-- -->7<!-- --> days.</p><p class="mb-muted" style="font-size:13px;line-height:20px;margin:0 0 12px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:12px;margin-left:0">Button not working? Paste this link into your browser:<br/><a href="https://fieldnote.app/invite/accept?token=5be91d" class="mb-muted" style="color:#6B7079;text-decoration-line:none;text-decoration:underline;word-break:break-all" target="_blank">https://fieldnote.app/invite/accept?token=5be91d</a></p><p class="mb-muted" style="font-size:13px;line-height:20px;margin:0 0 0px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:0px;margin-left:0">Not expecting this? You can ignore the email — you won't be added unless you accept.</p></td></tr></tbody></table></td></tr></tbody></table><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="padding:28px 8px 0"><tbody><tr><td><p class="mb-muted" style="font-size:12px;line-height:18px;margin:0 0 6px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:6px;margin-left:0">You're receiving this email because you have a Fieldnote account.</p><p class="mb-muted" style="font-size:12px;line-height:18px;margin:0 0 6px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:6px;margin-left:0">Fieldnote Inc. · 548 Market St #4120 · San Francisco, CA 94104</p><p class="mb-muted" style="font-size:12px;line-height:18px;margin:12px 0 0;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:12px;margin-right:0;margin-bottom:0;margin-left:0"><a href="https://x.com/fieldnote" class="mb-muted" style="color:#6B7079;text-decoration-line:none;text-decoration:underline" target="_blank">X</a> · <a href="https://linkedin.com/company/fieldnote" class="mb-muted" style="color:#6B7079;text-decoration-line:none;text-decoration:underline" target="_blank">LinkedIn</a> · <a href="https://github.com/fieldnote" class="mb-muted" style="color:#6B7079;text-decoration-line:none;text-decoration:underline" target="_blank">GitHub</a></p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><!--/$--></body></html>You're invited
Join Northbeam on Fieldnote
Daniel Okafor (daniel@northbeam.co) invited you to collaborate in the
Northbeam workspace as a Editor.
PR
TL
AS
JM
Priya Raman, Tom Lindqvist and 2 others are already here.
Accept invitation (https://fieldnote.app/invite/accept?token=5be91d)
This invitation expires in 7 days.
Button not working? Paste this link into your browser:
https://fieldnote.app/invite/accept?token=5be91d
Not expecting this? You can ignore the email — you won't be added unless you
accept.
You're receiving this email because you have a Fieldnote account.
Fieldnote Inc. · 548 Market St #4120 · San Francisco, CA 94104
X (https://x.com/fieldnote) · LinkedIn
(https://linkedin.com/company/fieldnote) · GitHub
(https://github.com/fieldnote)
The TSX imports components.tsx and theme.ts from the kit. Grab the free starter (all six free templates with their components) on the free page.
Related
Mention
№28 · TeamComment notification with the quoted message, context and a reply button.
Role changed
№29 · TeamPermission change notice listing what the user can now do (or no longer do).
Access request
№30 · TeamAdmin email to approve or decline a join request in one click.
Welcome
№01 · OnboardingA founder-signed welcome with one primary action and a three-step activation checklist.