/
132
Sponsor

Card

Card Coupons rendered with email-safe, renderer-native components.

import { CardCoupons } from "@/components/email/card-coupons";
import { defaultTheme } from "@/components/email/theme-default";

export function CardCouponsDemo() {
  return <CardCoupons variant="with-name" theme={defaultTheme} />;
}

Installation

$ pnpm dlx shadcn@latest add @emailcn/mjml-react/card-coupons

Usage

import { CardCoupons } from "@/components/email/card-coupons";
<CardCoupons variant="with-name" />

Examples

Pattern

import { CardCoupons } from "@/components/email/card-coupons";

export function CardCouponsPatternDemo() {
  return <CardCoupons variant="with-pattern" />;
}

Background image

import { CardCoupons } from "@/components/email/card-coupons";

export function CardCouponsBackgroundImageDemo() {
  return <CardCoupons variant="with-background-image" />;
}

Overlay

import { CardCoupons } from "@/components/email/card-coupons";

export function CardCouponsOverlayDemo() {
  return <CardCoupons variant="with-overlay" />;
}

Background image header

import { CardCoupons } from "@/components/email/card-coupons";

export function CardCouponsBackgroundImageHeaderDemo() {
  return <CardCoupons variant="background-image-header" />;
}

API Reference

PropTypeDefaultDescription
themeEmailThemedefaultThemeRenderer theme configuration.
headingstring-Configures the component's heading.
recipientstring"Jenna Adams"Configures the component's recipient.
codestring"WINTER20OFF"Configures the component's code.
descriptionstring"Use code: WINTER20OFF at checkout, or click the link below to automatically apply the discount to your order."Configures the component's description.
logoSrcstring-Configures the component's logosrc.
logoAltstring"Maizzle"Configures the component's logoalt.
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.
backgroundColorstring"#fffffe"Configures the component's backgroundcolor.
cardBackgroundColorstring"#1f2937"Configures the component's cardbackgroundcolor.
codeBackgroundColorstring"#f3f4f6"Configures the component's codebackgroundcolor.
headingColorstring"#fffffe"Configures the component's headingcolor.
textColorstring"#4b5563"Configures the component's textcolor.
mutedTextColorstring"#9ca3af"Configures the component's mutedtextcolor.
buttonBackgroundColorstring"#4f46e5"Configures the component's buttonbackgroundcolor.
buttonColorstring"#fffffe"Configures the component's buttoncolor.
variant"with-name" | "with-pattern" | "with-overlay" | "with-background-image" | "background-image-header""with-overlay"Configures the component's variant.