/
132
Sponsor

Content Overlay

Coupons With Content Overlayed rendered with email-safe, renderer-native components.

import { CouponsWithContentOverlayed } from "@/components/email/coupons-with-content-overlayed";
import { defaultTheme } from "@/components/email/theme-default";

export function CouponsWithContentOverlayedDemo() {
  return (
    <CouponsWithContentOverlayed
      variant="split"
      theme={{ ...defaultTheme, containerWidth: "640px" }}
    />
  );
}

Installation

$ pnpm dlx shadcn@latest add @emailcn/react-email/coupons-with-content-overlayed

Usage

import { CouponsWithContentOverlayed } from "@/components/email/coupons-with-content-overlayed";
<CouponsWithContentOverlayed variant="split" />

Examples

Centered

import { CouponsWithContentOverlayed } from "@/components/email/coupons-with-content-overlayed";

export function CouponsWithContentOverlayedCenteredDemo() {
  return <CouponsWithContentOverlayed variant="centered" />;
}

Code at bottom

import { CouponsWithContentOverlayed } from "@/components/email/coupons-with-content-overlayed";

export function CouponsWithContentOverlayedCodeAtBottomDemo() {
  return <CouponsWithContentOverlayed variant="code-bottom" />;
}

API Reference

PropTypeDefaultDescription
themeEmailThemedefaultThemeRenderer theme configuration.
overlinestring"Our biggest sale of the year"Configures the component's overline.
discountstring"20% OFF"Configures the component's discount.
codestring"WINTER20OFF"Configures the component's code.
expirystring"until 31/10/2025"Configures the component's expiry.
backgroundImageSrcstring-Configures the component's backgroundimagesrc.
buttonLabelstring"Shop now"Configures the component's buttonlabel.
buttonHrefstring"https://example.com"Configures the component's buttonhref.
arrowIconSrcstring"https://placehold.co/64x64/C2410C/FFFFFF.png?text=Arrow%20Right"Configures the component's arrowiconsrc.
pageBackgroundColorstring"#f1f5f9"Configures the component's pagebackgroundcolor.
headingColorstring"#fffffe"Configures the component's headingcolor.
codeBackgroundColorstring"#fffffe"Configures the component's codebackgroundcolor.
codeColorstring"#030712"Configures the component's codecolor.
buttonBackgroundColorstring"#030712"Configures the component's buttonbackgroundcolor.
buttonColorstring"#fffffe"Configures the component's buttoncolor.
variant"split" | "centered" | "code-bottom""code-bottom"Configures the component's variant.