Components
The small set of email-safe primitives used by every template.
Use these server-rendered components instead of your app’s browser UI components. They output portable inline HTML without CSS variables, client JavaScript, or Radix dependencies.
ShadcnEmail
The root document supplies preview text, background, font, width, and theme.
<ShadcnEmail preview="Your receipt is ready" theme="dark">
{/* email content */}
</ShadcnEmail>theme accepts "light", "dark", or resolved token overrides from createShadcnEmailTheme().
Content primitives
<EmailCard>
<EmailHeading>Welcome to Acme</EmailHeading>
<EmailText>Your workspace is ready.</EmailText>
<EmailButton href="https://acme.com/dashboard">Open dashboard</EmailButton>
<EmailSeparator />
</EmailCard>EmailCardprovides a centered, bordered content surface.EmailHeadingsets the primary email heading.EmailTexthandles readable body copy and muted text.EmailButtonrenders an inbox-safe link in default or outline style.EmailSeparatoradds a portable horizontal rule.
Theme tokens
import { createShadcnEmailTheme } from "@opencoredev/email-sdk/react";
const theme = createShadcnEmailTheme({
background: "#fafafa",
primary: "#7c3aed",
primaryForeground: "#ffffff",
radius: 12,
});
<ShadcnEmail theme={theme}>{/* email content */}</ShadcnEmail>;Pass resolved colors rather than CSS variable expressions because email clients cannot reliably read your application stylesheet.
