Blocks
Social
Links to social profiles: a line of the networks' icons, each linked to its profile.
import { Social } from "@hyper-elements/react";Example
[X] (https://x.com/example) [GitHub] (https://github.com/example) [LinkedIn] (https://linkedin.com/company/example) [YouTube] (https://youtube.com/@example)
- 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}</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"><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td></td><td width="32" valign="top" style="width:32px"><a href="https://x.com/example" target="_blank" rel="noopener noreferrer" title="X" style="text-decoration:none"><img src="https://cdn.tools.unlayer.com/social/icons/rounded/x.png" alt="X" width="32" border="0" style="display:block;width:100%;max-width:32px;height:auto;border:0"></a></td><td width="10" style="width:10px"></td><td width="32" valign="top" style="width:32px"><a href="https://github.com/example" target="_blank" rel="noopener noreferrer" title="GitHub" style="text-decoration:none"><img src="https://cdn.tools.unlayer.com/social/icons/rounded/github.png" alt="GitHub" width="32" border="0" style="display:block;width:100%;max-width:32px;height:auto;border:0"></a></td><td width="10" style="width:10px"></td><td width="32" valign="top" style="width:32px"><a href="https://linkedin.com/company/example" target="_blank" rel="noopener noreferrer" title="LinkedIn" style="text-decoration:none"><img src="https://cdn.tools.unlayer.com/social/icons/rounded/linkedin.png" alt="LinkedIn" width="32" border="0" style="display:block;width:100%;max-width:32px;height:auto;border:0"></a></td><td width="10" style="width:10px"></td><td width="32" valign="top" style="width:32px"><a href="https://youtube.com/@example" target="_blank" rel="noopener noreferrer" title="YouTube" style="text-decoration:none"><img src="https://cdn.tools.unlayer.com/social/icons/rounded/youtube.png" alt="YouTube" width="32" border="0" style="display:block;width:100%;max-width:32px;height:auto;border:0"></a></td><td></td></tr></table></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, Social } 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 }}>
<Social
icons={[
{ name: "X", href: "https://x.com/example" },
{ name: "GitHub", href: "https://github.com/example" },
{ name: "LinkedIn", href: "https://linkedin.com/company/example" },
{ name: "YouTube", href: "https://youtube.com/@example" },
]}
iconType="rounded"
size={32}
style={{ gap: 10 }}
/>
</Column>
</Email>
);
}Reference
Links to social profiles: a line of the networks’ icons, each linked to its profile.
Holds: nothing. Drawn in: email, page.
Props:
icons: a list of icons, each { name, href } (required). Each network by name (“Instagram”, “LinkedIn”) and the link to its profile.iconType: one of “circle”, “rounded”, “squared” (default"circle")size: an integer from 1 (default32). Each icon’s width and height, in px.
style:
gap: a length (a number of px) (default5). Space between children.justifyContent: one of “start”, “center”, “end” (default"center"). Where the icons sit across the line.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): gap.