Blocks
Menu
A line of links (a site's sections, a footer's), onto more lines where they don't fit, with a separator between them on desktop; or links down a column.
import { Menu } from "@hyper-elements/react";Example
Product (https://example.com/product) · Pricing (https://example.com/pricing) · Docs (https://example.com/docs) · Blog (https://example.com/blog)
- No diagnostics. Nothing to fix, nothing degraded.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="x-apple-disable-message-reformatting"><!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]--><meta name="format-detection" content="telephone=no,address=no,email=no,date=no,url=no"><meta name="color-scheme" content="light"><meta name="supported-color-schemes" content="light"><!--[if mso]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--><style>table,td{mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse}img{-ms-interpolation-mode:bicubic}a[x-apple-data-detectors]{color:inherit!important;text-decoration:none!important}@media (max-width: 540px){.eippbt{display:none!important}}</style></head><body style="margin:0;padding:0;-webkit-text-size-adjust:100%;background-color:#fff"><div role="article" aria-roledescription="email" style="background-color:#fff;overflow-wrap:break-word;word-break:break-word"><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#ffffff" style="background-color:#fff"><tr><td align="center"><!--[if mso]><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="520" align="center"><tr><td><![endif]--><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="max-width:520px"><tr><td><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td style="padding:24px"><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" style="font-size:0;text-align:center"><!--[if mso]><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]--><div style="display:inline-block;vertical-align:top;font-size:14px"><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding:5px 15px"><p style="margin:0;color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:14px;line-height:16.8px;mso-line-height-rule:exactly;text-align:left"><a href="https://example.com/product" style="color:#0f172a;text-decoration:none">Product</a></p></td></tr></table></div><!--[if mso]></td><td valign="top"><![endif]--><div class="eippbt" style="display:inline-block;vertical-align:top;font-size:14px"><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding:5px 0"><p style="margin:0;color:#94a3b8;font-family:Inter, Helvetica, Arial, sans-serif;font-size:14px;line-height:16.8px;mso-line-height-rule:exactly;text-align:left">·</p></td></tr></table></div><!--[if mso]></td><td valign="top"><![endif]--><div style="display:inline-block;vertical-align:top;font-size:14px"><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding:5px 15px"><p style="margin:0;color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:14px;line-height:16.8px;mso-line-height-rule:exactly;text-align:left"><a href="https://example.com/pricing" style="color:#0f172a;text-decoration:none">Pricing</a></p></td></tr></table></div><!--[if mso]></td><td valign="top"><![endif]--><div class="eippbt" style="display:inline-block;vertical-align:top;font-size:14px"><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding:5px 0"><p style="margin:0;color:#94a3b8;font-family:Inter, Helvetica, Arial, sans-serif;font-size:14px;line-height:16.8px;mso-line-height-rule:exactly;text-align:left">·</p></td></tr></table></div><!--[if mso]></td><td valign="top"><![endif]--><div style="display:inline-block;vertical-align:top;font-size:14px"><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding:5px 15px"><p style="margin:0;color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:14px;line-height:16.8px;mso-line-height-rule:exactly;text-align:left"><a href="https://example.com/docs" style="color:#0f172a;text-decoration:none">Docs</a></p></td></tr></table></div><!--[if mso]></td><td valign="top"><![endif]--><div class="eippbt" style="display:inline-block;vertical-align:top;font-size:14px"><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding:5px 0"><p style="margin:0;color:#94a3b8;font-family:Inter, Helvetica, Arial, sans-serif;font-size:14px;line-height:16.8px;mso-line-height-rule:exactly;text-align:left">·</p></td></tr></table></div><!--[if mso]></td><td valign="top"><![endif]--><div style="display:inline-block;vertical-align:top;font-size:14px"><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding:5px 15px"><p style="margin:0;color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:14px;line-height:16.8px;mso-line-height-rule:exactly;text-align:left"><a href="https://example.com/blog" style="color:#0f172a;text-decoration:none">Blog</a></p></td></tr></table></div><!--[if mso]></td></tr></table><![endif]--></td></tr></table></td></tr></table></td></tr></table></td></tr></table><!--[if mso]></td></tr></table><![endif]--></td></tr></table></div></body></html>Show the code
import { Column, Email, Menu } from "@hyper-elements/react";
export default function Example() {
return (
<Email width={520} style={{ backgroundColor: "#ffffff", fontFamily: "Inter, Helvetica, Arial, sans-serif", color: "#0f172a", gap: 16 }}>
<Column style={{ padding: 24, gap: 16 }}>
<Menu
items={[
{ text: "Product", href: "https://example.com/product" },
{ text: "Pricing", href: "https://example.com/pricing" },
{ text: "Docs", href: "https://example.com/docs" },
{ text: "Blog", href: "https://example.com/blog" },
]}
separator="·"
style={{ fontSize: 14, color: "#0f172a", separatorColor: "#94a3b8", justifyContent: "center" }}
/>
</Column>
</Email>
);
}Reference
A line of links (a site’s sections, a footer’s), onto more lines where they don’t fit, with a separator between them on desktop; or links down a column.
Holds: nothing. Drawn in: email, page.
Props:
items: a list of items, each { text, href } (required). Each link’s text and where it goes.separator: text (default""). Between the links of a horizontal menu (“|”, “·”), on desktop: phones show none.layout: one of “horizontal”, “vertical” (default"horizontal")
style:
color: color (default"#0068A5", inherited)fontFamily: fontFamily (inherited)fontSize: a length (a number of px) (default14, inherited)fontWeight: fontWeight (inherited)lineHeight: lineHeight (default1.2, inherited)letterSpacing: a length (a number of px) (inherited)textTransform: one of “none”, “uppercase”, “lowercase”, “capitalize” (inherited)separatorColor: color (default"#444444")padding: insets (default{"top":5,"right":15,"bottom":5,"left":15}). Around each link: its sides are the space between them.justifyContent: one of “start”, “center”, “end” (default"center"). Where the links sit.flex: flex. In a Row: its share of the width left after children with a width (default 1); “none” takes its own size.
mobile (on phones): fontSize, lineHeight, letterSpacing.