5
Sponsor

Details

Avatar Details rendered with email-safe, renderer-native components.

import { AvatarDetails } from "@/components/email/avatar-details";
import { defaultTheme } from "@/components/email/theme-default";

export function AvatarDetailsDemo() {
  return (
    <AvatarDetails
      align="left"
      theme={{ ...defaultTheme, containerWidth: "640px" }}
    />
  );
}

Installation

$ pnpm dlx shadcn@latest add @emailcn/mjml-react/avatar-details

Usage

import { AvatarDetails } from "@/components/email/avatar-details";
<AvatarDetails align="left" />

Examples

Avatar with details

left

import { AvatarDetails } from "@/components/email/avatar-details";

export function AvatarDetailsAlignLeftExampleDemo() {
  return <AvatarDetails align="left" />;
}

center

import { AvatarDetails } from "@/components/email/avatar-details";

export function AvatarDetailsAlignCenterExampleDemo() {
  return <AvatarDetails align="center" />;
}
import { AvatarDetails } from "@/components/email/avatar-details";

export function AvatarDetailsAlignRightExampleDemo() {
  return <AvatarDetails align="right" />;
}

API Reference

PropTypeDefaultDescription
themeEmailThemedefaultThemeRenderer theme configuration.
avatar{ name: string; url?: string }-Configures the component's avatar.
namestring-Configures the component's name.
emailstring-Configures the component's email.
align"left" | "center" | "right""left"Configures the component's align.