Hi
For some reason I can't get the custom social networks working at all.
<mj-social
display="custom-network"
custom-network-icon="https://vodacom-now-blog.s3.amazonaws.com/uploads/image/image/277/facebook.png"
custom-network-href="http://www.google.com/"
/>
any help would be greatly appreciated.
Hey @dawidvdh,
By default, text-mode is set to true, which means you need to define a content for your social icon.
Note that content is mandatory if text-mode is set to true
You can omit a content by setting text-mode to false.
Please also add an icon-color (you can set it to none if you don't want any.
This MJML code should work:
<mjml>
<mj-body>
<mj-container>
<mj-section>
<mj-column>
<mj-social
display="custom-network"
text-mode="false"
custom-network-icon-color="none"
custom-network-icon="https://vodacom-now-blog.s3.amazonaws.com/uploads/image/image/277/facebook.png"
custom-network-href="http://www.google.com/" />
</mj-column>
</mj-section>
</mj-container>
</mj-body>
</mjml>
Let me know if it helps!
Awesome that works thanks!
It works with one icon (one social). How can be work with 4 socials? (for example: facebook, youtube, vimeo and linkedin?
If I paste the code twice the icones align vertically and not horizontally
hey @kaiusvreo, put the different social networks in the same mj-social tag and use mode="horizontal" to display the icons side by side: https://mjml.io/documentation/#mjml-social
ngarnier, thanks so much for your reply,
I understand how it works, and it works.
I have only one thing to fix, how is possible to change the size of the icon?
My icon is 30x30px but it has the same size of the original icon
You can use icon-size: https://mjml.io/try-it-live/SyjNBaH5l (I cleaned a bit your code as you were using invalid attributes such as margin, height and width.
ngarnier you rock!
thanks so so so so so much!
it's perfect!
These examples do not work anymore. What's changed?
The syntax changed in MJML v4 @Premitium https://mjml.io/try-it-live/components/social
These are the regular icons, what about having custom ones?
Most helpful comment
Hey @dawidvdh,
By default,
text-modeis set to true, which means you need to define a content for your social icon.You can omit a content by setting
text-modetofalse.Please also add an icon-color (you can set it to
noneif you don't want any.This MJML code should work:
Let me know if it helps!