import { HeaderWithLogoAndSocialIcons } from "@/components/email/header-with-logo-and-social-icons";
import { defaultTheme } from "@/components/email/theme-default";
export function HeaderWithLogoAndSocialIconsDemo() {
return (
<HeaderWithLogoAndSocialIcons
alignment="left"
theme={{ ...defaultTheme, containerWidth: "640px" }}
/>
);
}Installation
$ pnpm dlx shadcn@latest add @emailcn/react-email/header-with-logo-and-social-icons
Usage
import { HeaderWithLogoAndSocialIcons } from "@/components/email/header-with-logo-and-social-icons";<HeaderWithLogoAndSocialIcons alignment="left" />Examples
Centered
import { HeaderWithLogoAndSocialIcons } from "@/components/email/header-with-logo-and-social-icons";
export function HeaderWithLogoAndSocialIconsCenteredDemo() {
return <HeaderWithLogoAndSocialIcons alignment="center" />;
}Right logo
import { HeaderWithLogoAndSocialIcons } from "@/components/email/header-with-logo-and-social-icons";
export function HeaderWithLogoAndSocialIconsAlignmentRightExampleDemo() {
return <HeaderWithLogoAndSocialIcons alignment="right" />;
}API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
theme | EmailTheme | defaultTheme | Renderer theme configuration. |
logoSrc | string | "https://placehold.co/320x96/0F766E/FFFFFF.png?text=Maizzle%20Insignia" | Configures the component's logosrc. |
logoAlt | string | "Maizzle" | Configures the component's logoalt. |
logoHref | string | "https://example.com" | Configures the component's logohref. |
socials | Array<{ alt: string; href: string; src: string }> | Built-in socials | Configures the component's socials. |
alignment | "left" | "center" | "right" | "left" | Configures the component's alignment. |
pageBackgroundColor | string | "#f1f5f9" | Configures the component's pagebackgroundcolor. |
backgroundColor | string | "#fffffe" | Configures the component's backgroundcolor. |