Blocks
List
A bulleted or numbered list of ListItems. Its markers sit in a column of their own (indent) before the items.
import { List } from "@hyper-elements/react";Example
1. Write the template in JSX 2. Render it - HTML for the inbox - Plain text, automatically 3. Send it with any provider
- 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="list" cellpadding="0" cellspacing="0" border="0" width="100%"><tr role="listitem"><td aria-hidden="true" width="24" valign="top" style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:right;width:24px;box-sizing:border-box;padding-right:8px;padding-bottom:6px">1.</td><td valign="top" style="padding-bottom:6px"><div style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:left">Write the template in JSX</div></td></tr><tr role="listitem"><td aria-hidden="true" width="24" valign="top" style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:right;width:24px;box-sizing:border-box;padding-right:8px;padding-bottom:6px">2.</td><td valign="top" style="padding-bottom:6px"><div style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:left">Render it</div><table role="list" cellpadding="0" cellspacing="0" border="0" width="100%"><tr role="listitem"><td aria-hidden="true" width="24" valign="top" style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:right;width:24px;box-sizing:border-box;padding-right:8px;padding-bottom:4px">•</td><td valign="top" style="padding-bottom:4px"><div style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:left">HTML for the inbox</div></td></tr><tr role="listitem"><td aria-hidden="true" width="24" valign="top" style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:right;width:24px;box-sizing:border-box;padding-right:8px">•</td><td valign="top"><div style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:left">Plain text, automatically</div></td></tr></table></td></tr><tr role="listitem"><td aria-hidden="true" width="24" valign="top" style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:right;width:24px;box-sizing:border-box;padding-right:8px">3.</td><td valign="top"><div style="color:#0f172a;font-family:Inter, Helvetica, Arial, sans-serif;font-size:16px;line-height:24px;mso-line-height-rule:exactly;text-align:left">Send it with any provider</div></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, List, ListItem } 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 }}>
<List type="number" style={{ gap: 6 }}>
<ListItem>Write the template in JSX</ListItem>
<ListItem>
Render it
<List style={{ gap: 4 }}>
<ListItem>HTML for the inbox</ListItem>
<ListItem>Plain text, automatically</ListItem>
</List>
</ListItem>
<ListItem>Send it with any provider</ListItem>
</List>
</Column>
</Email>
);
}Reference
A bulleted or numbered list of ListItems. Its markers sit in a column of their own (indent) before the items.
Holds: ListItem. Drawn in: email, page.
Props:
type: one of “bullet”, “number” (default"bullet")start: an integer from 0 (default1). The first item’s number, in a numbered list.
style:
color: color (inherited)fontFamily: fontFamily (inherited)fontSize: a length (a number of px) (inherited)fontWeight: fontWeight (inherited)fontStyle: one of “normal”, “italic” (inherited)lineHeight: lineHeight (inherited)letterSpacing: a length (a number of px) (inherited)textAlign: one of “left”, “center”, “right”, “justify” (inherited)textTransform: one of “none”, “uppercase”, “lowercase”, “capitalize” (inherited)width: a length (a number of px, %)maxWidth: a length (a number of px, %)padding: insetsbackgroundColor: colorborder: bordergap: a length (a number of px). Space between items.indent: a length (a number of px) (default24). The width of the markers’ column, before the items.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, textAlign, width, maxWidth, padding, border, gap.