5
Sponsor

Social Icons

Header With Logo And Social Icons rendered with email-safe, renderer-native components.

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" />;
}
import { HeaderWithLogoAndSocialIcons } from "@/components/email/header-with-logo-and-social-icons";

export function HeaderWithLogoAndSocialIconsAlignmentRightExampleDemo() {
  return <HeaderWithLogoAndSocialIcons alignment="right" />;
}

API Reference

PropTypeDefaultDescription
themeEmailThemedefaultThemeRenderer theme configuration.
logoSrcstring"https://placehold.co/320x96/0F766E/FFFFFF.png?text=Maizzle%20Insignia"Configures the component's logosrc.
logoAltstring"Maizzle"Configures the component's logoalt.
logoHrefstring"https://example.com"Configures the component's logohref.
socialsArray<{ alt: string; href: string; src: string }>Built-in socialsConfigures the component's socials.
alignment"left" | "center" | "right""left"Configures the component's alignment.
pageBackgroundColorstring"#f1f5f9"Configures the component's pagebackgroundcolor.
backgroundColorstring"#fffffe"Configures the component's backgroundcolor.