React Email provides a set of layout components that help you structure your email templates using a table-based layout system. These components ensure your emails render consistently across all major email clients.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sutharjay1/reactui-email/llms.txt
Use this file to discover all available pages before exploring further.
Container
TheContainer component is the main wrapper for your email content, providing consistent width and centering.
Common classes for Container:
mx-auto- Centers the container horizontallypx-4- Horizontal padding (16px)py-5- Vertical padding (20px)w-full- Full width container
Default behavior
The Container component:- Centers content horizontally by default
- Has a maximum width of 600px (email standard)
- Provides a consistent wrapper for all email body content
Always wrap your main email content in a Container to ensure proper rendering across email clients.
Section
TheSection component groups related content and provides vertical spacing between different parts of your email.
Common classes for Section:
my-4- Vertical margin (16px top and bottom)my-8- Vertical margin (32px top and bottom)mt-4/mb-4- Individual top/bottom marginstext-center- Center align section content
Use cases
- Separating header, body, and footer content
- Creating visual breaks between content blocks
- Grouping related elements (logo + heading, image + caption, etc.)
Row and Column
TheRow and Column components create multi-column layouts using table-based structure.
Basic two-column layout
Common width classes for columns:
w-1/2- 50% width (2 columns)w-1/3- 33.33% width (3 columns)w-2/3- 66.67% width (asymmetric layout)pr-2/pl-2- Padding for gutters between columns
Three-column grid
Column alignment
Control horizontal alignment within columns:Column alignment options:
left- Align content to the leftcenter- Center content horizontallyright- Align content to the right
Advanced table layouts
For more complex layouts with borders or specific styling, use HTML table elements directly with inline styles:Use inline styles for critical table properties like
border, borderCollapse, and padding to ensure consistent rendering across email clients.Text and Heading
Typography components for displaying text content:Text component
Common text styling classes:
text-[14px]/text-[16px]- Font sizesleading-6- Line heighttext-primary- Text colortext-primary/80- Text color with 80% opacitym-0- Remove default marginsp-0- Remove default padding
Heading component
Common heading styling classes:
text-lg- Large text sizetext-[32px]- Explicit pixel sizefont-normal/font-semibold/font-bold- Font weightsmx-0 my-0- Remove horizontal/vertical margins
Image component
Display images with proper sizing and styling:Image URL (must be absolute URL, not relative path)
Alt text for accessibility
Explicit width in pixels
Explicit height in pixels
Responsive images
For responsive images, use percentage-based widths:Hr (Horizontal Rule)
Create visual separators between sections:Common Hr styling:
my-[26px]- Vertical marginw-full- Full width lineborder border-solid border-[#eaeaea]- Border stylingmx-0- Remove horizontal margin
Link component
Create clickable links with proper styling:The destination URL
Common link styling:
underline- Underline the link texttext-primary/75- Link color with opacityfont-semibold- Bold link text
Best practices
Spacing and layout
- Consistent spacing: Use multiples of 4px for margins and padding (
my-4,my-8,px-4) - Container usage: Always wrap content in a Container component
- Section separation: Use Section components to group related content
- Mobile-first: Design with mobile devices in mind, as many users read email on phones
Email client compatibility
These layout components use table-based layouts, which have the best cross-client compatibility. Avoid using CSS Grid or Flexbox for main layout structure.
Performance
- Keep images under 1MB for faster loading
- Use appropriate image formats (JPEG for photos, PNG for graphics)
- Always specify image dimensions to prevent layout shifts
Accessibility
- Use semantic HTML elements (headings, paragraphs)
- Provide descriptive alt text for all images
- Ensure sufficient color contrast for text
- Use logical heading hierarchy (h1 → h2 → h3)