4.9.3 • Published 3 years ago

mjml-navbar-node6 v4.9.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

mj-navbar

Displays a menu for navigation with an optional hamburger mode for mobile devices.

<mjml>
  <mj-body>
    <mj-section background-color="#ef6451">
      <mj-column>
        <mj-navbar base-url="https://mjml.io" hamburger="hamburger" ico-color="#ffffff">
            <mj-navbar-link href="/gettings-started-onboard" color="#ffffff">Getting started</mj-navbar-link>
            <mj-navbar-link href="/try-it-live" color="#ffffff">Try it live</mj-navbar-link>
            <mj-navbar-link href="/templates" color="#ffffff">Templates</mj-navbar-link>
            <mj-navbar-link href="/components" color="#ffffff">Components</mj-navbar-link>
        </mj-navbar>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

mj-navbar

Individual links of the menu should we wrapped inside mj-navbar.

Standard Desktop:

Standard Mobile:

Mode hamburger enabled:

attributeunitdescriptiondefault value
alignstringalign content left/center/rightcenter
base urlstringbase url for children componentsn/a
css-classstringclass name, added to the root HTML element createdn/a
hamburgerstringactivate the hamburger navigation on mobile if the value is hamburgern/a
ico-alignstringhamburger icon alignment, left/center/right (hamburger mode required)center
ico-closeASCII code decimalchar code for a custom close icon (hamburger mode required)8855
ico-colorcolor formathamburger icon color (hamburger mode required)#000000
ico-font-familystringhamburger icon font (only on hamburger mode)Ubuntu, Helvetica, Arial, sans-serif
ico-font-sizepxhamburger icon size (hamburger mode required)30px
ico-line-heightpxhamburger icon line height (hamburger mode required)30px
ico-openASCII code decimalchar code for a custom open icon (hamburger mode required)9776
ico-paddingpxhamburger icon padding, supports up to 4 parameters (hamburger mode required)10px
ico-padding-bottompxhamburger icon bottom offset (hamburger mode required)10px
ico-padding-leftpxhamburger icon left offset (hamburger mode required)10px
ico-padding-rightpxhamburger icon right offset (hamburger mode required)10px
ico-padding-toppxhamburger icon top offset (hamburger mode required)10px
ico-text-decorationstringhamburger icon text decoration none/underline/overline/line-through (hamburger mode required)none
ico-text-transformstringhamburger icon text transformation none/capitalize/uppercase/lowercase (hamburger mode required)none

mj-navbar-link

This component should be used to display an individual link in the navbar.

attributeunitdescriptiondefault value
colorcolortext color#000000
css-classstringclass name, added to the root HTML element createdn/a
font-familystringfontUbuntu, Helvetica, Arial, sans-serif
font-sizepxtext size13px
font-stylestringnormal/italic/obliquen/a
font-weightnumbertext thicknessn/a
hrefstringlink to redirect to on clickn/a
letter-spacingpx,emletter-spacingn/a
line-heightpxspace between the lines22px
paddingpxsupports up to 4 parameters15px 10px
padding-bottompxbottom offsetn/a
padding-leftpxleft offsetn/a
padding-rightpxright offsetn/a
padding-toppxtop offsetn/a
relstringspecify the rel attributen/a
targetstringlink target on clickn/a
text-decorationstringunderline/overline/nonen/a
text-transformstringcapitalize/uppercase/lowercase/noneuppercase