/
132
Sponsor

Centered Text

Coupons With Centered Text rendered with email-safe, renderer-native components.

import { CouponsWithCenteredText } from "@/components/email/coupons-with-centered-text";
import { defaultTheme } from "@/components/email/theme-default";

export function CouponsWithCenteredTextDemo() {
  return (
    <CouponsWithCenteredText
      variant="impact"
      theme={{ ...defaultTheme, containerWidth: "640px" }}
    />
  );
}

Installation

$ pnpm dlx shadcn@latest add @emailcn/react-email/coupons-with-centered-text

Usage

import { CouponsWithCenteredText } from "@/components/email/coupons-with-centered-text";
<CouponsWithCenteredText variant="impact" />

Examples

Inline

import { CouponsWithCenteredText } from "@/components/email/coupons-with-centered-text";

export function CouponsWithCenteredTextInlineDemo() {
  return <CouponsWithCenteredText variant="inline" />;
}

Background

import { CouponsWithCenteredText } from "@/components/email/coupons-with-centered-text";

export function CouponsWithCenteredTextBackgroundDemo() {
  return <CouponsWithCenteredText variant="impact-background" />;
}

Alternate

import { CouponsWithCenteredText } from "@/components/email/coupons-with-centered-text";

export function CouponsWithCenteredTextAlternateDemo() {
  return <CouponsWithCenteredText variant="impact-alt" />;
}

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.
descriptionstring"Use code: WINTER20OFF at checkout, or click the link below to automatically apply the discount to your order."Configures the component's description.
backgroundImageSrcstring"https://picsum.photos/seed/emailcn-coupons-pattern/800/600.jpg"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.
codeBackgroundColorstring"#f3f4f6"Configures the component's codebackgroundcolor.
headingColorstring"#030712"Configures the component's headingcolor.
textColorstring"#4b5563"Configures the component's textcolor.
buttonBackgroundColorstring"#4f46e5"Configures the component's buttonbackgroundcolor.
buttonColorstring"#fffffe"Configures the component's buttoncolor.
variant"impact" | "inline" | "impact-alt" | "impact-background""impact"Configures the component's variant.