/
132
Sponsor

Stacked

Stacked Stats rendered with email-safe, renderer-native components.

import { StackedStats } from "@/components/email/stacked-stats";
import { defaultTheme } from "@/components/email/theme-default";

export function StackedStatsDemo() {
  return (
    <StackedStats
      variant="left"
      theme={{ ...defaultTheme, containerWidth: "640px" }}
    />
  );
}

Installation

$ pnpm dlx shadcn@latest add @emailcn/react-email/stacked-stats

Usage

import { StackedStats } from "@/components/email/stacked-stats";
<StackedStats variant="left" />

Examples

Centered

import { StackedStats } from "@/components/email/stacked-stats";

export function StackedStatsCenteredDemo() {
  return <StackedStats variant="center" />;
}

Right aligned

import { StackedStats } from "@/components/email/stacked-stats";

export function StackedStatsRightAlignedDemo() {
  return <StackedStats variant="right" />;
}

API Reference

PropTypeDefaultDescription
themeEmailThemedefaultThemeRenderer theme configuration.
variant"left" | "center" | "right""left"Configures the component's variant.
statsArray<{ heading: string; value: string; description: string }>-Configures the component's stats.
pageBackgroundColorstring"#f1f5f9"Configures the component's pagebackgroundcolor.
backgroundColorstring"#fffffe"Configures the component's backgroundcolor.
accentColorstring"#f97316"Configures the component's accentcolor.
headingColorstring"#030712"Configures the component's headingcolor.
textColorstring"#4b5563"Configures the component's textcolor.
dividerColorstring"#cbd5e1"Configures the component's dividercolor.