Blocks
Image
An image in the content. Without a width it takes its own size, no wider than its parent.
import { Image } from "@hyper-elements/react";Example
[Lumen Conf 2027] 1200 × 600 file, shown at the column's width.
- infoemail/outlook-degraded
borderRadius on this Image in classic Outlook: square corners
root.children[0].children[0].style.borderRadius
<!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 style="padding-bottom:16px"><img src="https://hyperelements.dev/img/event-hero.png" alt="Lumen Conf 2027" width="472" height="236" border="0" style="display:block;width:100%;max-width:472px;height:auto;border:0;border-radius:10px"></td></tr><tr><td><p style="margin:0;color:#64748b;font-family:Inter, Helvetica, Arial, sans-serif;font-size:13px;line-height:19.5px;mso-line-height-rule:exactly;text-align:center">1200 × 600 file, shown at the column's width.</p></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, Image, Text } 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 }}>
<Image
src={{ src: "https://hyperelements.dev/img/event-hero.png", width: 1200, height: 600 }}
alt="Lumen Conf 2027"
style={{ borderRadius: 10 }}
/>
<Text style={{ fontSize: 13, color: "#64748b", textAlign: "center" }}>1200 × 600 file, shown at the column's width.</Text>
</Column>
</Email>
);
}Reference
An image in the content. Without a width it takes its own size, no wider than its parent.
Holds: nothing. Drawn in: email, page.
Props:
src: asset (required)alt: text (default""). Read out by screen readers, and shown where images don’t load.title: text. Shown as a tooltip by mail clients and browsers that show one.
style:
width: a length (a number of px, %)maxWidth: a length (a number of px, %)height: a length (a number of px)border: borderborderRadius: radiusflex: flex. In a Row: its share of the width left after children with a width (default 1); “none” takes its own size.alignSelf: one of “start”, “center”, “end”. Where it sits in its stack on phones, where that’s another place than on desktop.verticalAlign: one of “top”, “middle”. Where it sits in a line of text it’s in.
mobile (on phones): width, maxWidth, border, alignSelf.