Socket
Book a DemoInstallSign in
Socket

mjml-button

Package Overview
Dependencies
Maintainers
0
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjml-button

mjml-button

latest
Source
npmnpm
Version
4.18.0
Version published
Weekly downloads
511K
5.52%
Maintainers
0
Weekly downloads
 
Created
Source

mj-button

Displays a customizable button.

desktop

Important

The mj-button won't be fully clickable because of client support. See discussion at Issue #359.

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-button font-family="Helvetica" background-color="#f45e43" color="white">
          Don't click me!
         </mj-button>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Note

mj-button is an "ending tag", which means that it can contain HTML code but it cannot contain other MJML components.

More information about ending tags in this section.

Attributes

attributeacceptsdescriptiondefault value
alignleft center righthorizontal alignmentcenter
background-colorCSS color formatsbutton background-color#414141
borderstringCSS border formatnone
border-bottomstringCSS border format
border-leftstringCSS border format
border-radiusstringborder radius3px
border-rightstringCSS border format
border-topstringCSS border format
colorCSS color formatstext color#ffffff
container-background-colorCSS color formatsbutton container background color
css-classstringclass name, added to the root HTML element created
font-familystringfont nameUbuntu, Helvetica, Arial, sans-serif
font-sizepxtext size13px
font-stylestringCSS values, e.g. normal italic oblique
font-weightstringtext thicknessnormal
heightpx %button height
hrefstringURL format
inner-paddingpx %inner button padding,
supports up to 4 parameters
10px 25px
letter-spacingpx emletter-spacing
line-heightpx %line-height on link120%
namestringspecify the name attribute for the button link
paddingpx %button container padding, supports up to 4 parameters10px 25px
padding-bottompx %button container bottom padding
padding-leftpx %button container left padding
padding-rightpx %button container right padding
padding-toppx %button container top padding
relstringspecify the rel attribute for the button link
targetstringspecify the target attribute for the button link_blank
text-alignleft center righttext-align button content
text-decorationstringunderline/overline/nonenone
text-transformstringcapitalize/uppercase/lowercasenone
titlestringtooltip & accessibility
vertical-aligntop bottom middle verticalvertical alignmentmiddle
widthpx %button width

Try it live

FAQs

Package last updated on 08 Dec 2025

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