Convert Figma logo to code with AI

emailmonday logoCerberus

A few simple, but solid patterns for responsive HTML email templates and newsletters. Even in Outlook and Gmail.

4,987
704
4,987
12

Top Related Projects

A free simple responsive HTML email template

A few simple, but solid patterns for responsive HTML email templates and newsletters. Even in Outlook and Gmail.

16,905

MJML: the only framework that makes responsive-email easy

Rock-solid transactional email templates for applications.

Email Blueprints is a collection of HTML email templates that can serve as a solid foundation and starting point for the design of emails

Quick Overview

Cerberus is a responsive email pattern library designed to simplify the process of creating HTML emails that work across various email clients and devices. It provides a set of modular, customizable templates and components that can be easily adapted to create professional-looking email designs.

Pros

  • Responsive design that works across multiple email clients and devices
  • Modular and customizable components for easy adaptation
  • Well-documented with clear instructions and examples
  • Regularly updated to maintain compatibility with evolving email standards

Cons

  • Requires some knowledge of HTML and CSS for customization
  • May have limitations in design flexibility compared to custom-built email templates
  • Some advanced features may not be supported in older email clients
  • Learning curve for developers new to email development

Code Examples

  1. Basic template structure:
<!DOCTYPE html>
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
    <meta charset="utf-8">
    <meta name="x-apple-disable-message-reformatting">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
    <title>Email Template</title>
    <!--[if mso]>
    <xml>
        <o:OfficeDocumentSettings>
            <o:PixelsPerInch>96</o:PixelsPerInch>
        </o:OfficeDocumentSettings>
    </xml>
    <style>
        td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;}
    </style>
    <![endif]-->
</head>
<body>
    <!-- Email content goes here -->
</body>
</html>
  1. Responsive column layout:
<table class="row" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
    <tr>
        <td style="padding: 0 24px;">
            <table class="col-2" align="center" cellpadding="0" cellspacing="0" role="presentation">
                <tr>
                    <td class="col" width="280" style="padding: 0 8px;">
                        <!-- Column 1 content -->
                    </td>
                    <td class="col" width="280" style="padding: 0 8px;">
                        <!-- Column 2 content -->
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
  1. Button component:
<table cellpadding="0" cellspacing="0" role="presentation">
    <tr>
        <td style="border-radius: 4px; background-color: #0000FF;">
            <a href="https://example.com" style="display: block; padding: 12px 24px; font-size: 16px; font-weight: bold; color: #FFFFFF; text-decoration: none;">
                Click me
            </a>
        </td>
    </tr>
</table>

Getting Started

  1. Clone the Cerberus repository:

    git clone https://github.com/TedGoas/Cerberus.git
    
  2. Choose a template from the cerberus folder (e.g., cerberus-responsive.html).

  3. Copy the template and customize it with your content and styles.

  4. Test your email using email testing tools like Litmus or Email on Acid.

  5. Once satisfied, use an ESP (Email Service Provider) or SMTP server to send your email.

Competitor Comparisons

A free simple responsive HTML email template

Pros of responsive-html-email-template

  • Simpler structure with a single file, making it easier to understand and modify
  • More extensive inline comments explaining each section of the template
  • Includes a plaintext version of the email content

Cons of responsive-html-email-template

  • Less modular design compared to Cerberus' multiple template options
  • Fewer pre-built components and layout options
  • Limited customization options without additional modifications

Code Comparison

responsive-html-email-template:

<div class="container">
  <div class="content">
    <table role="presentation" class="main">
      <!-- START MAIN CONTENT AREA -->
      <tr>
        <td class="wrapper">
          <table role="presentation" border="0" cellpadding="0" cellspacing="0">

Cerberus:

<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
  <tr>
    <td style="padding: 20px 0 30px 0;">
      <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
        <tr>
          <td style="padding: 0 20px 20px;">

The code comparison shows that both templates use nested tables for layout, but responsive-html-email-template uses additional wrapper divs for improved structure and styling. Cerberus relies more heavily on inline styles, while responsive-html-email-template separates styles into a <style> block.

A few simple, but solid patterns for responsive HTML email templates and newsletters. Even in Outlook and Gmail.

Pros of Cerberus

  • Well-established and widely used in the email development community
  • Comprehensive documentation and examples available
  • Regular updates and maintenance

Cons of Cerberus

  • May have more complexity than necessary for simple email templates
  • Learning curve for new users unfamiliar with the system
  • Potential performance impact due to extensive code base

Code Comparison

Cerberus:

<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td style="padding: 20px 0 30px 0;">
      <!-- Email content goes here -->
    </td>
  </tr>
</table>

Since both repositories are the same (emailmonday/Cerberus), there is no actual code difference to compare. The code snippet above is an example of the table-based structure used in Cerberus for email layouts.

Summary

As the comparison is between the same repository (emailmonday/Cerberus), there are no actual differences to highlight. Cerberus is a popular HTML email template that provides a solid foundation for creating responsive emails across various email clients. It offers a balance between flexibility and consistency, making it a valuable tool for email developers. However, its comprehensive nature may be overwhelming for beginners or simple projects.

16,905

MJML: the only framework that makes responsive-email easy

Pros of MJML

  • More comprehensive framework with a wider range of components
  • Offers a live editor and preview for real-time development
  • Provides a CLI tool for easy integration into build processes

Cons of MJML

  • Steeper learning curve due to its custom syntax
  • Larger output file size compared to hand-coded HTML
  • May require additional setup and dependencies

Code Comparison

MJML:

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text>Hello World</mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Cerberus:

<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
  <tr>
    <td style="padding: 20px 0; text-align: center">
      Hello World
    </td>
  </tr>
</table>

MJML uses a custom XML-like syntax that gets compiled into HTML, while Cerberus provides ready-to-use HTML templates. MJML offers more abstraction and component-based development, whereas Cerberus gives developers direct control over the HTML structure. The choice between the two depends on project requirements, team expertise, and desired workflow.

Rock-solid transactional email templates for applications.

Pros of postmark-templates

  • More comprehensive set of email templates, including transactional and marketing emails
  • Actively maintained with regular updates and contributions
  • Includes both HTML and plain text versions of templates

Cons of postmark-templates

  • Less focus on responsive design compared to Cerberus
  • May require more customization for specific use cases
  • Larger file sizes due to more extensive template collection

Code Comparison

Cerberus (responsive table structure):

<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px;">
  <tr>
    <td style="padding: 20px 0; text-align: center">
      <!-- Content here -->
    </td>
  </tr>
</table>

postmark-templates (simpler table structure):

<table class="email-content" width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <td class="email-body" width="100%" cellpadding="0" cellspacing="0">
      <!-- Content here -->
    </td>
  </tr>
</table>

Both repositories offer valuable email template resources, with Cerberus focusing on responsive design and postmark-templates providing a wider variety of template types. The choice between them depends on specific project requirements and design preferences.

Email Blueprints is a collection of HTML email templates that can serve as a solid foundation and starting point for the design of emails

Pros of email-blueprints

  • More comprehensive collection of email templates
  • Includes templates for various types of emails (newsletters, transactional, etc.)
  • Maintained by Mailchimp, a leading email marketing platform

Cons of email-blueprints

  • Less frequently updated compared to Cerberus
  • May have more complex code structure due to the variety of templates
  • Potentially steeper learning curve for beginners

Code Comparison

Cerberus (simplified structure):

<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td style="padding: 20px 0 30px 0;">
      <!-- Email content here -->
    </td>
  </tr>
</table>

email-blueprints (more detailed structure):

<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateContainer">
  <tr>
    <td align="center" valign="top">
      <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateBody">
        <!-- Email content here -->
      </table>
    </td>
  </tr>
</table>

Both repositories offer valuable resources for email template development. Cerberus focuses on providing a lightweight, responsive template, while email-blueprints offers a wider range of templates for different purposes. The choice between them depends on specific project requirements and developer preferences.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Cerberus Responsive Email Patterns

Cerberus logo

Coding regular emails is hard enough by itself. Making them responsive and accessible shouldn’t add to the headache. A few simple, but solid patterns are all that’s needed to optimize emails for small screens and assistive technologies.

That’s what Cerberus is.

It’s just a few responsive email patterns that go a long way. The code blocks are compartmentalized so that they may be used, combined, and nested to build an email.

Each template is annotated and has good support among popular email clients.

Learn More and See Examples

Contents

cerberus-fluid.html - Good for simple layouts such as transactional and single column emails.

cerberus-responsive.html - Good for more complicated, shape-shifting email layouts that work on some mobile clients.

cerberus-hybrid.html - This template uses a hybrid approach to reconfigure the layout for different screen sizes for email clients regardless of media query support.

License

Let’s go with something simple and permissive, shall we?

The MIT License (MIT).

Copyright (c) Ted Goas

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.