🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

mjml-column

Package Overview
Dependencies
Maintainers
7
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjml-column

mjml-column

latest
Source
npmnpm
Version
5.1.0
Version published
Weekly downloads
1.4M
5.6%
Maintainers
7
Weekly downloads
 
Created
Source

mj-column

Columns enable you to organize the content of your sections into distinct columns which stack when viewed on a mobile device.

They must be located within mj-section tags in order to be considered by the engine.

Caution

The sum of columns in a section cannot be greater than the width of the parent mj-section (or 100%).

Every single column has to contain something because they are responsive containers, and will be vertically stacked on a mobile view. Any standard component, or component that you have defined and registered, can be placed within a column – except mj-column or mj-section elements.

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <!-- Your first column -->
      </mj-column>
      <mj-column>
        <!-- Your second column -->
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Caution

Columns are used as a container for your content and should not be used to offset. Any MJML component included in a column will have a width equivalent to 100% of this column's width.

Caution

Neither the mj-column or mj-section tags can be nested in an mj-column tag

Attributes

attributeacceptsdescriptiondefault attributes
background-colorCSS color formatsbackground color for a column
borderstringCSS border format
border-bottomstringCSS border format
border-leftstringCSS border format
border-radiusstringborder radius
border-rightstringCSS border format
border-topstringCSS border format
css-classstringclass name, added to the root HTML element created
directionltr rtlset the display order of direct childrenltr
inner-background-colorCSS color formatsinner background color for column; requires a padding
inner-borderstringCSS border; requires a padding format
inner-border-bottomstringCSS border format; requires a padding
inner-border-leftstringCSS border format; requires a padding
inner-border-radiusstringborder radius ; requires a padding
inner-border-rightstringCSS border format; requires a padding
inner-border-topstringCSS border format; requires a padding
paddingpx %column padding, supports up to 4 parameters
padding-bottompx %column bottom padding
padding-leftpx %column left padding
padding-rightpx %column right padding
padding-toppx %column top padding
widthpx %column width(100 / number of non-raw elements in section)%
vertical-aligntop middle bottomvertical alignment.
Note: middle only applies when all mj-column instances use it
top

Try it live

FAQs

Package last updated on 24 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts