Row AddOn

Overview

The Row AddOn type allows you to insert pre-built row structures with columns and multiple content modules. Unlike Mixed Content AddOns that insert modules sequentially, Row AddOns create structured layouts with side-by-side columns—perfect for multi-column designs like product grids, feature comparisons, or content layouts that require horizontal organization.

What Makes Row AddOns Unique

Row AddOns provide layout structure in addition to content:

  • Define the number of columns using a 12-column grid system

  • Control column widths using weight values (1-12)

  • Include multiple modules within each column

  • Create complex, multi-column layouts in one drop

This is ideal when you need consistent, reusable layout patterns that go beyond simple vertical stacking.

Prerequisites

Before implementing a Row AddOn in your code, you must first create the addon in the Beefree SDK Developer Console:

  1. Log into the Developer Console and navigate to your application

  2. Create a new Custom AddOn and select "Row" as the type

  3. Configure the addon with a unique handle (e.g., my-row-addon)

  4. Choose your implementation method (Content Dialog or External iframe)

  5. Save the addon configuration

Important: The handle you create in the Developer Console must match exactly with the addon ID you reference in your code's beeConfig. This handle serves as the unique identifier that connects your code implementation to the addon configuration in the console.

Content Object Schema

Required Structure

The Row AddOn schema uses type: 'rowAddon' with a value containing a name identifier and a columns array. Each column has a weight (1-12, defining its width in the 12-column grid) and a modules array containing the content for that column. The optional metadata object lets you store custom information about the row. This structure creates complete layout systems in a single insertion.

Understanding Column Weights

Columns use a 12-column grid system where weights must add up to 12 for proper layout:

  • Single column (full width): weight: 12

  • Two equal columns (50/50): weight: 6 each

  • Three equal columns (33/33/33): weight: 4 each

  • Two-thirds + one-third (67/33): weight: 8 and weight: 4

This flexible system allows you to create any column configuration that matches your design needs.

Simple Two-Column Example

This basic example demonstrates a two-column layout with equal width columns (50/50 split). Each column contains a simple content structure with an image and text. This pattern is perfect for side-by-side content presentation like before/after comparisons, feature highlights, or product showcases where visual balance matters.

Three-Column Example

This example shows a three-column layout with equal widths (33/33/33 split), ideal for displaying multiple items in a grid format like product features, team members, or service offerings. Each column contains an image and title, creating a balanced, professional layout that presents information in an organized, scannable format perfect for email marketing.

Content Dialog Implementation

Basic Handler

The Content Dialog method enables programmatic row insertion through a JavaScript handler. When users drag your row addon onto the stage, this handler is immediately invoked and resolves with a complete row structure including columns and their content. This pattern works perfectly for predefined layouts that don't require user configuration, providing instant insertion of complex, multi-column structures with consistent formatting.

Pattern: Dynamic Column Generation

This pattern demonstrates programmatically building row structures from data arrays, making it easy to create layouts from dynamic sources like product catalogs, API responses, or database queries. By calculating column weights and mapping through your data, you can generate properly structured rows with any number of columns while maintaining consistent module structure. This is particularly powerful for content that changes frequently or needs to scale based on available items.

Pattern: User-Configured Rows

This advanced pattern shows how to let users configure row layout and content before insertion. By opening a custom interface, users can select the number of columns, choose content for each column, and configure the layout structure. The handler waits for user confirmation, then builds the row based on their selections. This provides maximum flexibility while automating the complex task of creating properly structured multi-column layouts.

Iframe Implementation

Conceptual Flow

The Iframe method provides complete UI flexibility by loading your custom web application inside the Beefree editor. Your iframe communicates with Beefree through postMessage events, following a specific protocol. This approach is ideal for visual layout builders, template galleries, or sophisticated interfaces where you need full control over how users design and configure multi-column row structures before inserting them into the email.

Required postMessage Communication

Your iframe must implement the standard postMessage protocol to integrate with Beefree. First, notify Beefree when your iframe is loaded and specify dialog dimensions. Listen for the "init" message to receive editor context. When the user finishes configuring their row layout, send "onSave" with your complete row object. If the user cancels, send "onCancel" to close without inserting. This bidirectional communication enables seamless integration between your custom layout builder and the Beefree editor.

1. Send "loaded" when your iframe is ready:

2. Listen for "init" message from Beefree:

3. Send "onSave" with row structure:

4. Send "onCancel" if user cancels:

Simple Iframe Example

This complete HTML example demonstrates a functional row layout builder interface. It includes the full postMessage protocol implementation and provides options for column count selection with simple content inputs for each column. Users can choose between 1-4 columns and provide image URLs for each. The interface automatically calculates column weights and builds the proper row structure. You can expand this basic example with drag-and-drop layout builders, visual column previews, advanced module configuration, or layout template galleries.

Available Module Types

You can use any of these module types within row columns:

  • title - Titles/headings (use type: 'title' in rows, not 'heading')

  • paragraph - Text content

  • image - Images

  • button - Call-to-action buttons

  • list - Ordered or unordered lists

  • icons - Icon sets

  • menu - Navigation menus

  • html - Custom HTML

Note: You cannot nest Row AddOns or Mixed Content AddOns inside a Row AddOn.

Column Weight Examples

Common Layouts

Using Metadata

Store custom information with your row for tracking or later reference:

Last updated

Was this helpful?