Email.Mjml.Attributes
HTML & web
Attributes for Email.Mjml layout nodes.
Types
Attribute
type Attribute = AttributeAn opaque layout attribute.
Examples
Email.Mjml.Attributes.href "https://example.com"Values
attribute
attribute : String -> String -> AttributeA raw name/value attribute.
Examples
attribute "data-id" "42"href
href : String -> AttributeLink target for buttons and anchors.
Examples
href "https://example.com/confirm"src
src : String -> AttributeImage URL.
Examples
src "https://cdn.example.com/logo.png"alt
alt : String -> AttributeImage alternative text.
Examples
alt "Company logo"width
width : String -> AttributeWidth in pixels (as a string, for example "600").
Examples
width "600"height
height : String -> AttributeHeight in pixels (as a string, for example "16"). Used by spacers.
Examples
height "16"backgroundColor
backgroundColor : String -> AttributeBackground color (#rrggbb or a CSS color name).
Examples
backgroundColor "#f5f5f5"color
color : String -> AttributeForeground / text color.
Examples
color "#111111"fontSize
fontSize : String -> AttributeFont size with unit (for example "16px").
Examples
fontSize "16px"align
align : String -> AttributeHorizontal alignment ("left", "center", "right").
Examples
align "center"padding
padding : String -> AttributeCSS padding (for example "12px 24px").
Examples
padding "12px 24px"