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
| Prop | Type | Default | Description |
|---|---|---|---|
theme | EmailTheme | defaultTheme | Renderer theme configuration. |
overline | string | "Our biggest sale of the year" | Configures the component's overline. |
discount | string | "20% OFF" | Configures the component's discount. |
code | string | "WINTER20OFF" | Configures the component's code. |
expiry | string | "until 31/10/2025" | Configures the component's expiry. |
backgroundImageSrc | string | - | Configures the component's backgroundimagesrc. |
buttonLabel | string | "Shop now" | Configures the component's buttonlabel. |
buttonHref | string | "https://example.com" | Configures the component's buttonhref. |
arrowIconSrc | string | "https://placehold.co/64x64/C2410C/FFFFFF.png?text=Arrow%20Right" | Configures the component's arrowiconsrc. |
pageBackgroundColor | string | "#f1f5f9" | Configures the component's pagebackgroundcolor. |
headingColor | string | "#fffffe" | Configures the component's headingcolor. |
codeBackgroundColor | string | "#fffffe" | Configures the component's codebackgroundcolor. |
codeColor | string | "#030712" | Configures the component's codecolor. |
buttonBackgroundColor | string | "#030712" | Configures the component's buttonbackgroundcolor. |
buttonColor | string | "#fffffe" | Configures the component's buttoncolor. |
variant | "split" | "centered" | "code-bottom" | "code-bottom" | Configures the component's variant. |