@hyper-elements/react 0.0.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/REFERENCE.md ADDED
@@ -0,0 +1,949 @@
1
+ # Components reference (`@hyper-elements/react`)
2
+
3
+ <!-- Written from the component definitions by src/primitives/reference.ts: don't edit by hand. Regenerate with UPDATE_REFERENCE=1 pnpm --filter @hyper-elements/react test reference -->
4
+
5
+ Every component, what it holds, and every prop and style it takes, with its default and what it does. [GUIDE.md](./GUIDE.md) shows how a template is written; `validate()` checks one against what's here.
6
+
7
+ Every component also takes:
8
+
9
+ - `style={{ … }}`: the styles listed under it. A number is px (`padding: 16` is `16px`).
10
+ - `mobile={{ … }}`: style overrides on phones, in an `Email` or a `Page`, for the styles listed under "`mobile`".
11
+ - `hover={{ … }}`: styles on hover, for the ones listed under "`hover`".
12
+ - `hidden={{ mobile: true }}` or `hidden={{ desktop: true }}`: shown on one only.
13
+ - `id`: an id of your own, written into the HTML.
14
+
15
+ ## Values
16
+
17
+ What a property takes, where it says *kind*:
18
+
19
+ - *fontFaces*: a list of { family, src, format, weight, style }
20
+ - *color*: a color ("#0879a1", "rgb(…)", "rgba(…)" or a CSS name)
21
+ - *fontFamily*: a font stack, as CSS writes it ("Inter, Arial, sans-serif")
22
+ - *fontWeight*: 100 to 900 in hundreds, "normal" or "bold"
23
+ - *lineHeight*: a multiple of the font size (1.5), a percentage ("150%"), px ("24px") or "normal" (the font's own)
24
+ - *insets*: px for all sides, "8px 16px" (1 to 4 values), [v, h] or [t, r, b, l], or { top, right, bottom, left }
25
+ - *border*: "1px solid #ccc", { width, style, color } for all sides, or { top, right, bottom, left } with one of those each
26
+ - *radius*: px for every corner, [topLeft, topRight, bottomRight, bottomLeft], or { topLeft, topRight, bottomRight, bottomLeft }
27
+ - *flex*: a share of the free width (0 or more), or "none"
28
+ - *link*: a URL (http, https, mailto, tel, a path, or a merge tag) or { href, target }
29
+ - *attributes*: attributes by name, each a text value (no on… handlers, href or style)
30
+ - *asset*: an image URL (http, https or a data:image URI), or { src, width, height }
31
+ - *line*: "1px solid #ccc" or { width, style, color }
32
+ - *video*: a YouTube or Vimeo video's https link
33
+
34
+ ## Roots
35
+
36
+ A template is one of these, and the root decides the output: `render()` writes an Email's HTML, a Page's HTML, and a Document's print HTML. `renderPdf()` (`@hyper-elements/react/pdf`) writes a Document's PDF, and `renderImage()` (`@hyper-elements/react/image`) a Canvas's PNG or SVG (`render()` writes a Canvas's HTML, to look at).
37
+
38
+ ### Email
39
+
40
+ An email. Its children are stacked down the content width, centered in the window.
41
+
42
+ Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: email.
43
+
44
+ Props:
45
+ - `width`: a length (a number of px) (default `600`)
46
+ - `previewText`: text. Shown after the subject in inbox lists, not in the email.
47
+ - `title`: text. The document's title (shown in a browser tab, and by some email clients).
48
+ - `lang`: text. Its language, as a BCP 47 tag ("en", "ar").
49
+ - `dir`: one of "ltr", "rtl", "auto"
50
+ - `fonts`: *fontFaces*. The font files the template loads: a family's file for each weight and style it uses. Text names a family in its fontFamily stack, before the fonts to show where it can't load.
51
+
52
+ `style`:
53
+ - `color`: *color* (default `"#000000"`, inherited)
54
+ - `fontFamily`: *fontFamily* (default `"Arial, Helvetica, sans-serif"`, inherited)
55
+ - `fontSize`: a length (a number of px) (default `16`, inherited)
56
+ - `fontWeight`: *fontWeight* (default `400`, inherited)
57
+ - `fontStyle`: one of "normal", "italic" (inherited)
58
+ - `lineHeight`: *lineHeight* (default `1.5`, inherited)
59
+ - `letterSpacing`: a length (a number of px) (inherited)
60
+ - `textAlign`: one of "left", "center", "right", "justify" (default `"left"`, inherited)
61
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
62
+ - `backgroundColor`: *color*. The window's background, behind the content.
63
+ - `gap`: a length (a number of px). Space between children.
64
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
65
+
66
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `gap`.
67
+
68
+ ### Page
69
+
70
+ A web page. Its children are stacked down the content width, centered in the window.
71
+
72
+ Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: page.
73
+
74
+ Props:
75
+ - `width`: a length (a number of px) (default `1200`). The widest the content gets.
76
+ - `description`: text. The page's meta description.
77
+ - `title`: text. The document's title (shown in a browser tab, and by some email clients).
78
+ - `lang`: text. Its language, as a BCP 47 tag ("en", "ar").
79
+ - `dir`: one of "ltr", "rtl", "auto"
80
+ - `fonts`: *fontFaces*. The font files the template loads: a family's file for each weight and style it uses. Text names a family in its fontFamily stack, before the fonts to show where it can't load.
81
+
82
+ `style`:
83
+ - `color`: *color* (default `"#000000"`, inherited)
84
+ - `fontFamily`: *fontFamily* (default `"Arial, Helvetica, sans-serif"`, inherited)
85
+ - `fontSize`: a length (a number of px) (default `16`, inherited)
86
+ - `fontWeight`: *fontWeight* (default `400`, inherited)
87
+ - `fontStyle`: one of "normal", "italic" (inherited)
88
+ - `lineHeight`: *lineHeight* (default `1.5`, inherited)
89
+ - `letterSpacing`: a length (a number of px) (inherited)
90
+ - `textAlign`: one of "left", "center", "right", "justify" (default `"left"`, inherited)
91
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
92
+ - `backgroundColor`: *color*. The window's background, behind the content.
93
+ - `gap`: a length (a number of px). Space between children.
94
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
95
+
96
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `gap`.
97
+
98
+ ### Document
99
+
100
+ A printed document: its children on pages of its size (Document.Page, or split by PageBreaks), a PageHeader and a PageFooter on each. Renders to print HTML, and to PDF with @hyper-elements/react/pdf.
101
+
102
+ Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html, Document.Page, PageBreak, PageHeader, PageFooter. Drawn in: page.
103
+
104
+ Props:
105
+ - `size`: one of "A3", "A4", "A5", "Letter", "Legal", "Tabloid" (default `"A4"`)
106
+ - `orientation`: one of "portrait", "landscape" (default `"portrait"`)
107
+ - `margin`: *insets* (default `{"top":48,"right":48,"bottom":48,"left":48}`). Around each page's content (its header and footer too), in px: 96 to the inch.
108
+ - `title`: text. The document's title (shown in a browser tab, and by some email clients).
109
+ - `lang`: text. Its language, as a BCP 47 tag ("en", "ar").
110
+ - `dir`: one of "ltr", "rtl", "auto"
111
+ - `fonts`: *fontFaces*. The font files the template loads: a family's file for each weight and style it uses. Text names a family in its fontFamily stack, before the fonts to show where it can't load.
112
+
113
+ `style`:
114
+ - `color`: *color* (default `"#000000"`, inherited)
115
+ - `fontFamily`: *fontFamily* (default `"Arial, Helvetica, sans-serif"`, inherited)
116
+ - `fontSize`: a length (a number of px) (default `16`, inherited)
117
+ - `fontWeight`: *fontWeight* (default `400`, inherited)
118
+ - `fontStyle`: one of "normal", "italic" (inherited)
119
+ - `lineHeight`: *lineHeight* (default `1.5`, inherited)
120
+ - `letterSpacing`: a length (a number of px) (inherited)
121
+ - `textAlign`: one of "left", "center", "right", "justify" (default `"left"`, inherited)
122
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
123
+ - `backgroundColor`: *color*. Each page's background, out to its edges.
124
+ - `gap`: a length (a number of px). Space between children.
125
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
126
+
127
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `gap`.
128
+
129
+ ### Canvas
130
+
131
+ An image of a fixed size (a social card, a banner): its children laid out in it as on a page. Written as PNG or SVG with @hyper-elements/react/image.
132
+
133
+ Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: page.
134
+
135
+ Props:
136
+ - `width`: a length (a number of px) (default `1200`). The image's width, in px.
137
+ - `height`: a length (a number of px) (default `630`). The image's height, in px: what's past it is cut.
138
+ - `title`: text. The document's title (shown in a browser tab, and by some email clients).
139
+ - `lang`: text. Its language, as a BCP 47 tag ("en", "ar").
140
+ - `dir`: one of "ltr", "rtl", "auto"
141
+ - `fonts`: *fontFaces*. The font files the template loads: a family's file for each weight and style it uses. Text names a family in its fontFamily stack, before the fonts to show where it can't load.
142
+
143
+ `style`:
144
+ - `color`: *color* (default `"#000000"`, inherited)
145
+ - `fontFamily`: *fontFamily* (default `"Arial, Helvetica, sans-serif"`, inherited)
146
+ - `fontSize`: a length (a number of px) (default `16`, inherited)
147
+ - `fontWeight`: *fontWeight* (default `400`, inherited)
148
+ - `fontStyle`: one of "normal", "italic" (inherited)
149
+ - `lineHeight`: *lineHeight* (default `1.5`, inherited)
150
+ - `letterSpacing`: a length (a number of px) (inherited)
151
+ - `textAlign`: one of "left", "center", "right", "justify" (default `"left"`, inherited)
152
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
153
+ - `backgroundColor`: *color*. The window's background, behind the content.
154
+ - `gap`: a length (a number of px). Space between children.
155
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
156
+ - `padding`: *insets*
157
+ - `justifyContent`: one of "start", "center", "end", "space-between". Where children sit along the layout's direction, as CSS justify-content.
158
+
159
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `gap`, `padding`.
160
+
161
+ ## Sections and layout
162
+
163
+ Bands and boxes that arrange blocks. None is required: a root stacks its children.
164
+
165
+ ### Section
166
+
167
+ A band across the whole window, directly in an Email or Page: its background spans the window, its children are stacked at the content width.
168
+
169
+ Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: email, page.
170
+
171
+ `style`:
172
+ - `color`: *color* (inherited)
173
+ - `fontFamily`: *fontFamily* (inherited)
174
+ - `fontSize`: a length (a number of px) (inherited)
175
+ - `fontWeight`: *fontWeight* (inherited)
176
+ - `fontStyle`: one of "normal", "italic" (inherited)
177
+ - `lineHeight`: *lineHeight* (inherited)
178
+ - `letterSpacing`: a length (a number of px) (inherited)
179
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
180
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
181
+ - `backgroundColor`: *color*
182
+ - `padding`: *insets*
183
+ - `border`: *border*
184
+ - `gap`: a length (a number of px). Space between children.
185
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
186
+
187
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `padding`, `border`, `gap`.
188
+
189
+ ### Row
190
+
191
+ Lays its children out side by side. A child takes its width, or a share of what's left (its flex, 1 by default).
192
+
193
+ Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: email, page.
194
+
195
+ Props:
196
+ - `stackOnMobile`: true or false (default `true`). Its children stack full-width on phones (in an Email or a Page).
197
+ - `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
198
+
199
+ `style`:
200
+ - `color`: *color* (inherited)
201
+ - `fontFamily`: *fontFamily* (inherited)
202
+ - `fontSize`: a length (a number of px) (inherited)
203
+ - `fontWeight`: *fontWeight* (inherited)
204
+ - `fontStyle`: one of "normal", "italic" (inherited)
205
+ - `lineHeight`: *lineHeight* (inherited)
206
+ - `letterSpacing`: a length (a number of px) (inherited)
207
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
208
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
209
+ - `width`: a length (a number of px, %)
210
+ - `minWidth`: a length (a number of px, %)
211
+ - `maxWidth`: a length (a number of px, %)
212
+ - `height`: a length (a number of px)
213
+ - `padding`: *insets*
214
+ - `backgroundColor`: *color*
215
+ - `border`: *border*
216
+ - `borderRadius`: *radius*
217
+ - `overflow`: one of "visible", "hidden". Whether content past a set height is cut off.
218
+ - `gap`: a length (a number of px). Space between children.
219
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
220
+ - `justifyContent`: one of "start", "center", "end", "space-between". Where children sit along the layout's direction, as CSS justify-content.
221
+ - `flexWrap`: one of "nowrap", "wrap", "words". "wrap": children that don't fit wrap onto another line, as CSS flex-wrap (in an email, in a Row kept side by side on phones, with no gap between the lines). "words": in an email, also a space of the text's font apart, on lines at least as tall as its, as words are.
222
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
223
+
224
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `gap`.
225
+
226
+ ### Column
227
+
228
+ Stacks its children vertically, with its own spacing and box.
229
+
230
+ Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: email, page.
231
+
232
+ `style`:
233
+ - `color`: *color* (inherited)
234
+ - `fontFamily`: *fontFamily* (inherited)
235
+ - `fontSize`: a length (a number of px) (inherited)
236
+ - `fontWeight`: *fontWeight* (inherited)
237
+ - `fontStyle`: one of "normal", "italic" (inherited)
238
+ - `lineHeight`: *lineHeight* (inherited)
239
+ - `letterSpacing`: a length (a number of px) (inherited)
240
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
241
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
242
+ - `width`: a length (a number of px, %)
243
+ - `minWidth`: a length (a number of px, %)
244
+ - `maxWidth`: a length (a number of px, %)
245
+ - `height`: a length (a number of px)
246
+ - `padding`: *insets*
247
+ - `backgroundColor`: *color*
248
+ - `border`: *border*
249
+ - `borderRadius`: *radius*
250
+ - `overflow`: one of "visible", "hidden". Whether content past a set height is cut off.
251
+ - `gap`: a length (a number of px). Space between children.
252
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
253
+ - `justifyContent`: one of "start", "center", "end", "space-between". Where children sit along the layout's direction, as CSS justify-content.
254
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
255
+
256
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `gap`.
257
+
258
+ ### Grid
259
+
260
+ Its children in columns of equal width, row after row; on phones, one under another.
261
+
262
+ Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: email, page.
263
+
264
+ Props:
265
+ - `columns`: an integer from 1 to 12 (default `2`). How many children to a row.
266
+ - `stackOnMobile`: true or false (default `true`). Its children one under another on phones (in an Email or a Page).
267
+
268
+ `style`:
269
+ - `color`: *color* (inherited)
270
+ - `fontFamily`: *fontFamily* (inherited)
271
+ - `fontSize`: a length (a number of px) (inherited)
272
+ - `fontWeight`: *fontWeight* (inherited)
273
+ - `fontStyle`: one of "normal", "italic" (inherited)
274
+ - `lineHeight`: *lineHeight* (inherited)
275
+ - `letterSpacing`: a length (a number of px) (inherited)
276
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
277
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
278
+ - `width`: a length (a number of px, %)
279
+ - `minWidth`: a length (a number of px, %)
280
+ - `maxWidth`: a length (a number of px, %)
281
+ - `height`: a length (a number of px)
282
+ - `padding`: *insets*
283
+ - `backgroundColor`: *color*
284
+ - `border`: *border*
285
+ - `borderRadius`: *radius*
286
+ - `overflow`: one of "visible", "hidden". Whether content past a set height is cut off.
287
+ - `gap`: a length (a number of px). Space between its children, across and down (unless rowGap is set).
288
+ - `rowGap`: a length (a number of px). Space between its rows (gap by default); on phones, where the children stack, gap is between them.
289
+ - `alignItems`: one of "start", "center", "end", "stretch". Where each child sits in its row's height, as CSS align-items.
290
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
291
+
292
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `gap`, `rowGap`.
293
+
294
+ ### Layer
295
+
296
+ Its children over each other, in one box as tall as the tallest: an image with words on it. In an email, an Image with one child over it.
297
+
298
+ Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: email, page.
299
+
300
+ `style`:
301
+ - `color`: *color* (inherited)
302
+ - `fontFamily`: *fontFamily* (inherited)
303
+ - `fontSize`: a length (a number of px) (inherited)
304
+ - `fontWeight`: *fontWeight* (inherited)
305
+ - `fontStyle`: one of "normal", "italic" (inherited)
306
+ - `lineHeight`: *lineHeight* (inherited)
307
+ - `letterSpacing`: a length (a number of px) (inherited)
308
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
309
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
310
+ - `width`: a length (a number of px, %)
311
+ - `minWidth`: a length (a number of px, %)
312
+ - `maxWidth`: a length (a number of px, %)
313
+ - `backgroundColor`: *color*
314
+ - `border`: *border*
315
+ - `borderRadius`: *radius*
316
+ - `height`: a length (a number of px). Its height: the image under its children covers it, cut at its sides or its top and bottom.
317
+ - `alignItems`: one of "start", "center", "end", "stretch" (default `"start"`). Where its children sit in its height, as CSS align-items.
318
+ - `justifyItems`: one of "start", "center", "end", "stretch" (default `"stretch"`). Where its children sit across its width, as CSS justify-items: stretched to it by default.
319
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
320
+
321
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `border`.
322
+
323
+ ## Blocks
324
+
325
+ Content, stacked down whatever holds it.
326
+
327
+ ### Svg
328
+
329
+ Shapes (Rect, Circle, Ellipse, Line, Polygon, Path) drawn in a box of its own: its width and height, and the coordinates its viewBox gives them.
330
+
331
+ Holds: Rect, Circle, Ellipse, Line, Polygon, Path. Drawn in: page.
332
+
333
+ Props:
334
+ - `width`: a number from 0 (required)
335
+ - `height`: a number from 0 (required)
336
+ - `viewBox`: text. The shapes' coordinates in it, as "x y width height" (its width and height by default).
337
+ - `title`: text. What it shows, read out by screen readers.
338
+
339
+ `style`:
340
+ - `padding`: *insets*
341
+ - `backgroundColor`: *color*
342
+ - `border`: *border*
343
+ - `borderRadius`: *radius*
344
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
345
+
346
+ `mobile` (on phones): `padding`, `border`.
347
+
348
+ ### Text
349
+
350
+ A paragraph of text.
351
+
352
+ Holds: text; PageNumber, Span, Link, LineBreak, MergeTag, Image. Drawn in: email, page.
353
+
354
+ Props:
355
+ - `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
356
+
357
+ `style`:
358
+ - `color`: *color* (inherited)
359
+ - `fontFamily`: *fontFamily* (inherited)
360
+ - `fontSize`: a length (a number of px) (inherited)
361
+ - `fontWeight`: *fontWeight* (inherited)
362
+ - `fontStyle`: one of "normal", "italic" (inherited)
363
+ - `lineHeight`: *lineHeight* (inherited)
364
+ - `letterSpacing`: a length (a number of px) (inherited)
365
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
366
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
367
+ - `textDecoration`: one of "none", "underline", "line-through"
368
+ - `width`: a length (a number of px, %)
369
+ - `maxWidth`: a length (a number of px, %)
370
+ - `padding`: *insets*
371
+ - `backgroundColor`: *color*
372
+ - `border`: *border*
373
+ - `borderRadius`: *radius*
374
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
375
+
376
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`.
377
+
378
+ ### Heading
379
+
380
+ A heading, from level 1 (the page's title) to 6.
381
+
382
+ Holds: text; PageNumber, Span, Link, LineBreak, MergeTag. Drawn in: email, page.
383
+
384
+ Props:
385
+ - `level`: one of 1, 2, 3, 4, 5, 6 (default `1`)
386
+ - `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
387
+
388
+ `style`:
389
+ - `color`: *color* (inherited)
390
+ - `fontFamily`: *fontFamily* (inherited)
391
+ - `fontSize`: a length (a number of px) (inherited)
392
+ - `fontWeight`: *fontWeight* (default `700`, inherited)
393
+ - `fontStyle`: one of "normal", "italic" (inherited)
394
+ - `lineHeight`: *lineHeight* (default `1.25`, inherited)
395
+ - `letterSpacing`: a length (a number of px) (inherited)
396
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
397
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
398
+ - `textDecoration`: one of "none", "underline", "line-through"
399
+ - `width`: a length (a number of px, %)
400
+ - `maxWidth`: a length (a number of px, %)
401
+ - `padding`: *insets*
402
+ - `backgroundColor`: *color*
403
+ - `border`: *border*
404
+ - `borderRadius`: *radius*
405
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
406
+
407
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`.
408
+
409
+ ### Button
410
+
411
+ A link drawn as a button.
412
+
413
+ Holds: text; Span, MergeTag, LineBreak. Drawn in: email, page.
414
+
415
+ Props:
416
+ - `href`: *link* (required)
417
+ - `title`: text. Shown as a tooltip by mail clients and browsers that show one.
418
+ - `aria-label`: text. What a screen reader says for it, where its text alone doesn't say enough ("Read more about pricing").
419
+ - `attrs`: *attributes*. More attributes for its link: a class, a `data-` attribute.
420
+
421
+ `style`:
422
+ - `color`: *color* (default `"#ffffff"`, inherited)
423
+ - `fontFamily`: *fontFamily* (inherited)
424
+ - `fontSize`: a length (a number of px) (default `14`, inherited)
425
+ - `fontWeight`: *fontWeight* (inherited)
426
+ - `fontStyle`: one of "normal", "italic" (inherited)
427
+ - `lineHeight`: *lineHeight* (default `1.2`, inherited)
428
+ - `letterSpacing`: a length (a number of px) (inherited)
429
+ - `textAlign`: one of "left", "center", "right", "justify" (default `"center"`, inherited)
430
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
431
+ - `textDecoration`: one of "none", "underline", "line-through"
432
+ - `width`: a length (a number of px, %)
433
+ - `maxWidth`: a length (a number of px, %)
434
+ - `padding`: *insets* (default `{"top":10,"right":20,"bottom":10,"left":20}`)
435
+ - `backgroundColor`: *color* (default `"#0879a1"`)
436
+ - `border`: *border*
437
+ - `borderRadius`: *radius* (default `4`)
438
+ - `boxSizing`: one of "border-box", "content-box". Whether its width holds its padding and border (border-box), or they go on top of it (content-box).
439
+ - `alignSelf`: one of "start", "center", "end". Where it sits in its stack, whatever the stack's alignItems: on phones too, another place than on desktop.
440
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
441
+
442
+ `hover`: `color`, `backgroundColor`.
443
+
444
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `alignSelf`.
445
+
446
+ ### Image
447
+
448
+ An image in the content. Without a width it takes its own size, no wider than its parent.
449
+
450
+ Holds: nothing. Drawn in: email, page.
451
+
452
+ Props:
453
+ - `src`: *asset* (required)
454
+ - `alt`: text (default `""`). Read out by screen readers, and shown where images don't load.
455
+ - `title`: text. Shown as a tooltip by mail clients and browsers that show one.
456
+
457
+ `style`:
458
+ - `width`: a length (a number of px, %)
459
+ - `maxWidth`: a length (a number of px, %)
460
+ - `height`: a length (a number of px)
461
+ - `border`: *border*
462
+ - `borderRadius`: *radius*
463
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
464
+ - `alignSelf`: one of "start", "center", "end". Where it sits in its stack on phones, where that's another place than on desktop.
465
+ - `verticalAlign`: one of "top", "middle". Where it sits in a line of text it's in.
466
+
467
+ `mobile` (on phones): `width`, `maxWidth`, `border`, `alignSelf`.
468
+
469
+ ### Divider
470
+
471
+ A horizontal line.
472
+
473
+ Holds: nothing. Drawn in: email, page.
474
+
475
+ `style`:
476
+ - `borderTop`: *line* (default `{"width":1,"style":"solid","color":"#bbbbbb"}`). The line, as CSS border-top: "1px solid #bbbbbb".
477
+ - `width`: a length (a number of px, %) (default `"100%"`)
478
+ - `padding`: *insets*
479
+
480
+ `mobile` (on phones): `width`, `padding`.
481
+
482
+ ### List
483
+
484
+ A bulleted or numbered list of ListItems. Its markers sit in a column of their own (indent) before the items.
485
+
486
+ Holds: ListItem. Drawn in: email, page.
487
+
488
+ Props:
489
+ - `type`: one of "bullet", "number" (default `"bullet"`)
490
+ - `start`: an integer from 0 (default `1`). The first item's number, in a numbered list.
491
+
492
+ `style`:
493
+ - `color`: *color* (inherited)
494
+ - `fontFamily`: *fontFamily* (inherited)
495
+ - `fontSize`: a length (a number of px) (inherited)
496
+ - `fontWeight`: *fontWeight* (inherited)
497
+ - `fontStyle`: one of "normal", "italic" (inherited)
498
+ - `lineHeight`: *lineHeight* (inherited)
499
+ - `letterSpacing`: a length (a number of px) (inherited)
500
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
501
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
502
+ - `width`: a length (a number of px, %)
503
+ - `maxWidth`: a length (a number of px, %)
504
+ - `padding`: *insets*
505
+ - `backgroundColor`: *color*
506
+ - `border`: *border*
507
+ - `gap`: a length (a number of px). Space between items.
508
+ - `indent`: a length (a number of px) (default `24`). The width of the markers' column, before the items.
509
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
510
+
511
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `gap`.
512
+
513
+ ### Table
514
+
515
+ A table of data: TableRows of TableCells. Columns take their cells' widths; the rest share what's left.
516
+
517
+ Holds: TableRow. Drawn in: email, page.
518
+
519
+ `style`:
520
+ - `color`: *color* (inherited)
521
+ - `fontFamily`: *fontFamily* (inherited)
522
+ - `fontSize`: a length (a number of px) (inherited)
523
+ - `fontWeight`: *fontWeight* (inherited)
524
+ - `fontStyle`: one of "normal", "italic" (inherited)
525
+ - `lineHeight`: *lineHeight* (inherited)
526
+ - `letterSpacing`: a length (a number of px) (inherited)
527
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
528
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
529
+ - `width`: a length (a number of px, %)
530
+ - `maxWidth`: a length (a number of px, %)
531
+ - `backgroundColor`: *color*
532
+ - `border`: *border*
533
+ - `cellPadding`: *insets*. Every cell's padding, where the cell doesn't set its own.
534
+ - `rowBorder`: *line*
535
+ - `borderCollapse`: one of "separate", "collapse". Whether cells side by side draw a border each (separate) or share one (collapse).
536
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
537
+
538
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `border`.
539
+
540
+ ### Video
541
+
542
+ A YouTube or Vimeo video: its player on a page; in an email (which can't play one), its thumbnail, linked to it.
543
+
544
+ Holds: nothing. Drawn in: email, page.
545
+
546
+ Props:
547
+ - `src`: *video* (required). The video's YouTube or Vimeo link.
548
+ - `thumbnail`: *asset*. The image an email shows, linked to the video. A YouTube video's own where there's none; a Vimeo video's can't be found without the network.
549
+ - `title`: text (default `"Video"`). The player's title on a page, the thumbnail's alternate text in an email.
550
+
551
+ `style`:
552
+ - `width`: a length (a number of px, %)
553
+ - `maxWidth`: a length (a number of px, %)
554
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
555
+
556
+ `mobile` (on phones): `width`, `maxWidth`.
557
+
558
+ ### Social
559
+
560
+ Links to social profiles: a line of the networks' icons, each linked to its profile.
561
+
562
+ Holds: nothing. Drawn in: email, page.
563
+
564
+ Props:
565
+ - `icons`: a list of icons, each { name, href } (required). Each network by name ("Instagram", "LinkedIn") and the link to its profile.
566
+ - `iconType`: one of "circle", "rounded", "squared" (default `"circle"`)
567
+ - `size`: an integer from 1 (default `32`). Each icon's width and height, in px.
568
+
569
+ `style`:
570
+ - `gap`: a length (a number of px) (default `5`). Space between children.
571
+ - `justifyContent`: one of "start", "center", "end" (default `"center"`). Where the icons sit across the line.
572
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
573
+
574
+ `mobile` (on phones): `gap`.
575
+
576
+ ### Menu
577
+
578
+ 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.
579
+
580
+ Holds: nothing. Drawn in: email, page.
581
+
582
+ Props:
583
+ - `items`: a list of items, each { text, href } (required). Each link's text and where it goes.
584
+ - `separator`: text (default `""`). Between the links of a horizontal menu ("|", "·"), on desktop: phones show none.
585
+ - `layout`: one of "horizontal", "vertical" (default `"horizontal"`)
586
+
587
+ `style`:
588
+ - `color`: *color* (default `"#0068A5"`, inherited)
589
+ - `fontFamily`: *fontFamily* (inherited)
590
+ - `fontSize`: a length (a number of px) (default `14`, inherited)
591
+ - `fontWeight`: *fontWeight* (inherited)
592
+ - `lineHeight`: *lineHeight* (default `1.2`, inherited)
593
+ - `letterSpacing`: a length (a number of px) (inherited)
594
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
595
+ - `separatorColor`: *color* (default `"#444444"`)
596
+ - `padding`: *insets* (default `{"top":5,"right":15,"bottom":5,"left":15}`). Around each link: its sides are the space between them.
597
+ - `justifyContent`: one of "start", "center", "end" (default `"center"`). Where the links sit.
598
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
599
+
600
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`.
601
+
602
+ ### Html
603
+
604
+ Markup written as it is, for what no component says (the builder's HTML block): in an email and on a page as given, nothing in it checked or escaped. A Document's PDF and a Canvas's image draw its plain text.
605
+
606
+ Holds: nothing. Drawn in: email, page.
607
+
608
+ Props:
609
+ - `html`: text (required). The markup, written as it is: only markup you trust. Or give it as JSX inside the block, which React writes.
610
+ - `text`: text. What it reads as in the plain-text version, and in a PDF or an image (its markup's words where there's none).
611
+
612
+ ## Inline
613
+
614
+ Inside text: a styled run, a link, a line break, a merge tag.
615
+
616
+ ### PageNumber
617
+
618
+ In a Document's text: the number of the page it's on, or (total) how many pages there are.
619
+
620
+ Holds: nothing. Drawn in: page.
621
+
622
+ Props:
623
+ - `total`: true or false (default `false`). How many pages the Document has, instead of this page's number.
624
+
625
+ ### Span
626
+
627
+ Styled text inside text; raised or lowered (superscript, subscript) with verticalAlign.
628
+
629
+ Holds: text; PageNumber, Span, Link, LineBreak, MergeTag. Drawn in: email, page.
630
+
631
+ `style`:
632
+ - `color`: *color* (inherited)
633
+ - `fontFamily`: *fontFamily* (inherited)
634
+ - `fontSize`: a length (a number of px) (inherited)
635
+ - `fontWeight`: *fontWeight* (inherited)
636
+ - `fontStyle`: one of "normal", "italic" (inherited)
637
+ - `letterSpacing`: a length (a number of px) (inherited)
638
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
639
+ - `textDecoration`: one of "none", "underline", "line-through"
640
+ - `backgroundColor`: *color*
641
+ - `verticalAlign`: one of "baseline", "super", "sub". "super": superscript (®, a footnote mark); "sub": subscript; as CSS vertical-align.
642
+
643
+ `mobile` (on phones): `fontSize`, `letterSpacing`.
644
+
645
+ ### Link
646
+
647
+ A link: text inside text, or around an Image.
648
+
649
+ Holds: text; PageNumber, Span, Link, LineBreak, MergeTag, Image. Drawn in: email, page.
650
+
651
+ Props:
652
+ - `href`: *link* (required)
653
+ - `title`: text. Shown as a tooltip by mail clients and browsers that show one.
654
+ - `aria-label`: text. What a screen reader says for it, where its text alone doesn't say enough ("Read more about pricing").
655
+ - `attrs`: *attributes*. More attributes for it: a class, a `data-` attribute.
656
+
657
+ `style`:
658
+ - `color`: *color* (default `"#0000ee"`, inherited)
659
+ - `fontFamily`: *fontFamily* (inherited)
660
+ - `fontSize`: a length (a number of px) (inherited)
661
+ - `fontWeight`: *fontWeight* (inherited)
662
+ - `fontStyle`: one of "normal", "italic" (inherited)
663
+ - `letterSpacing`: a length (a number of px) (inherited)
664
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
665
+ - `textDecoration`: one of "none", "underline", "line-through" (default `"underline"`)
666
+ - `backgroundColor`: *color*
667
+ - `flex`: *flex*. In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
668
+
669
+ `hover`: `color`, `textDecoration`, `backgroundColor`.
670
+
671
+ `mobile` (on phones): `fontSize`, `letterSpacing`.
672
+
673
+ ### LineBreak
674
+
675
+ Starts a new line inside text.
676
+
677
+ Holds: nothing. Drawn in: email, page.
678
+
679
+ ### MergeTag
680
+
681
+ A value the sending service fills in (a name, a link), written in the service's own syntax.
682
+
683
+ Holds: nothing. Drawn in: email, page.
684
+
685
+ Props:
686
+ - `name`: text (required)
687
+
688
+ ## Parts
689
+
690
+ Only inside the component named: a list's items, a table's rows and cells, a document's pages, header and footer.
691
+
692
+ ### Document.Page
693
+
694
+ One page of a Document (Document.Page in JSX): its children stacked down it, inside the Document's margins.
695
+
696
+ Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: page.
697
+
698
+ `style`:
699
+ - `color`: *color* (inherited)
700
+ - `fontFamily`: *fontFamily* (inherited)
701
+ - `fontSize`: a length (a number of px) (inherited)
702
+ - `fontWeight`: *fontWeight* (inherited)
703
+ - `fontStyle`: one of "normal", "italic" (inherited)
704
+ - `lineHeight`: *lineHeight* (inherited)
705
+ - `letterSpacing`: a length (a number of px) (inherited)
706
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
707
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
708
+ - `backgroundColor`: *color*. The page's background, out to its edges.
709
+ - `gap`: a length (a number of px). Space between children.
710
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
711
+
712
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `gap`.
713
+
714
+ ### PageBreak
715
+
716
+ In a Document, where a page ends: what follows starts the next page.
717
+
718
+ Holds: nothing. Drawn in: page.
719
+
720
+ ### PageHeader
721
+
722
+ In a Document: drawn at the top of every page, inside its margins.
723
+
724
+ Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: page.
725
+
726
+ `style`:
727
+ - `color`: *color* (inherited)
728
+ - `fontFamily`: *fontFamily* (inherited)
729
+ - `fontSize`: a length (a number of px) (inherited)
730
+ - `fontWeight`: *fontWeight* (inherited)
731
+ - `fontStyle`: one of "normal", "italic" (inherited)
732
+ - `lineHeight`: *lineHeight* (inherited)
733
+ - `letterSpacing`: a length (a number of px) (inherited)
734
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
735
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
736
+ - `padding`: *insets*
737
+ - `backgroundColor`: *color*
738
+ - `border`: *border*
739
+ - `gap`: a length (a number of px). Space between children.
740
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
741
+
742
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `padding`, `border`, `gap`.
743
+
744
+ ### PageFooter
745
+
746
+ In a Document: drawn at the bottom of every page, inside its margins.
747
+
748
+ Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Drawn in: page.
749
+
750
+ `style`:
751
+ - `color`: *color* (inherited)
752
+ - `fontFamily`: *fontFamily* (inherited)
753
+ - `fontSize`: a length (a number of px) (inherited)
754
+ - `fontWeight`: *fontWeight* (inherited)
755
+ - `fontStyle`: one of "normal", "italic" (inherited)
756
+ - `lineHeight`: *lineHeight* (inherited)
757
+ - `letterSpacing`: a length (a number of px) (inherited)
758
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
759
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
760
+ - `padding`: *insets*
761
+ - `backgroundColor`: *color*
762
+ - `border`: *border*
763
+ - `gap`: a length (a number of px). Space between children.
764
+ - `alignItems`: one of "start", "center", "end", "stretch". Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
765
+
766
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `padding`, `border`, `gap`.
767
+
768
+ ### ListItem
769
+
770
+ An item of a List: text, and a List of its own to nest one.
771
+
772
+ Holds: text; PageNumber, Span, Link, LineBreak, MergeTag, List. Drawn in: email, page.
773
+
774
+ Props:
775
+ - `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
776
+
777
+ `style`:
778
+ - `color`: *color* (inherited)
779
+ - `fontFamily`: *fontFamily* (inherited)
780
+ - `fontSize`: a length (a number of px) (inherited)
781
+ - `fontWeight`: *fontWeight* (inherited)
782
+ - `fontStyle`: one of "normal", "italic" (inherited)
783
+ - `lineHeight`: *lineHeight* (inherited)
784
+ - `letterSpacing`: a length (a number of px) (inherited)
785
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
786
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
787
+ - `textDecoration`: one of "none", "underline", "line-through"
788
+
789
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`.
790
+
791
+ ### TableRow
792
+
793
+ A row of a Table. A header row's cells are header cells, in bold.
794
+
795
+ Holds: TableCell. Drawn in: email, page.
796
+
797
+ Props:
798
+ - `header`: true or false (default `false`). Its cells head the columns below them.
799
+ - `footer`: true or false (default `false`). It ends the table (printed, on each page the table runs to).
800
+
801
+ `style`:
802
+ - `color`: *color* (inherited)
803
+ - `fontFamily`: *fontFamily* (inherited)
804
+ - `fontSize`: a length (a number of px) (inherited)
805
+ - `fontWeight`: *fontWeight* (inherited)
806
+ - `fontStyle`: one of "normal", "italic" (inherited)
807
+ - `lineHeight`: *lineHeight* (inherited)
808
+ - `letterSpacing`: a length (a number of px) (inherited)
809
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
810
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
811
+ - `backgroundColor`: *color*
812
+ - `height`: a length (a number of px)
813
+
814
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`.
815
+
816
+ ### TableCell
817
+
818
+ A cell of a TableRow: text, and images. Its width sets its column's.
819
+
820
+ Holds: text; PageNumber, Span, Link, LineBreak, MergeTag, Image. Drawn in: email, page.
821
+
822
+ Props:
823
+ - `colSpan`: an integer from 1 (default `1`). How many columns it spans.
824
+ - `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
825
+
826
+ `style`:
827
+ - `color`: *color* (inherited)
828
+ - `fontFamily`: *fontFamily* (inherited)
829
+ - `fontSize`: a length (a number of px) (inherited)
830
+ - `fontWeight`: *fontWeight* (inherited)
831
+ - `fontStyle`: one of "normal", "italic" (inherited)
832
+ - `lineHeight`: *lineHeight* (inherited)
833
+ - `letterSpacing`: a length (a number of px) (inherited)
834
+ - `textAlign`: one of "left", "center", "right", "justify" (inherited)
835
+ - `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited)
836
+ - `textDecoration`: one of "none", "underline", "line-through"
837
+ - `padding`: *insets*
838
+ - `backgroundColor`: *color*
839
+ - `border`: *border*
840
+ - `width`: a length (a number of px, %). Its column's width (of a cell spanning one column).
841
+ - `verticalAlign`: one of "top", "middle", "bottom"
842
+
843
+ `mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `padding`, `border`.
844
+
845
+ ## Shapes
846
+
847
+ Only inside an Svg, in its viewBox's units.
848
+
849
+ ### Rect
850
+
851
+ A rectangle at x, y in its Svg, rounded by rx.
852
+
853
+ Holds: nothing. Drawn in: page.
854
+
855
+ Props:
856
+ - `x`: a number (default `0`)
857
+ - `y`: a number (default `0`)
858
+ - `width`: a number from 0 (required)
859
+ - `height`: a number from 0 (required)
860
+ - `rx`: a number from 0
861
+
862
+ `style`:
863
+ - `fill`: *color* (default `"#000000"`). Its inside ("transparent" for none).
864
+ - `stroke`: *color*. Its outline's color.
865
+ - `strokeWidth`: a number from 0
866
+ - `opacity`: a number from 0 to 1
867
+
868
+ ### Circle
869
+
870
+ A circle centered at cx, cy in its Svg.
871
+
872
+ Holds: nothing. Drawn in: page.
873
+
874
+ Props:
875
+ - `cx`: a number (default `0`)
876
+ - `cy`: a number (default `0`)
877
+ - `r`: a number from 0 (required)
878
+
879
+ `style`:
880
+ - `fill`: *color* (default `"#000000"`). Its inside ("transparent" for none).
881
+ - `stroke`: *color*. Its outline's color.
882
+ - `strokeWidth`: a number from 0
883
+ - `opacity`: a number from 0 to 1
884
+
885
+ ### Ellipse
886
+
887
+ An ellipse centered at cx, cy in its Svg.
888
+
889
+ Holds: nothing. Drawn in: page.
890
+
891
+ Props:
892
+ - `cx`: a number (default `0`)
893
+ - `cy`: a number (default `0`)
894
+ - `rx`: a number from 0 (required)
895
+ - `ry`: a number from 0 (required)
896
+
897
+ `style`:
898
+ - `fill`: *color* (default `"#000000"`). Its inside ("transparent" for none).
899
+ - `stroke`: *color*. Its outline's color.
900
+ - `strokeWidth`: a number from 0
901
+ - `opacity`: a number from 0 to 1
902
+
903
+ ### Line
904
+
905
+ A straight line from x1, y1 to x2, y2 in its Svg (drawn by its stroke).
906
+
907
+ Holds: nothing. Drawn in: page.
908
+
909
+ Props:
910
+ - `x1`: a number (default `0`)
911
+ - `y1`: a number (default `0`)
912
+ - `x2`: a number (default `0`)
913
+ - `y2`: a number (default `0`)
914
+
915
+ `style`:
916
+ - `fill`: *color* (default `"#000000"`). Its inside ("transparent" for none).
917
+ - `stroke`: *color*. Its outline's color.
918
+ - `strokeWidth`: a number from 0
919
+ - `opacity`: a number from 0 to 1
920
+
921
+ ### Polygon
922
+
923
+ A closed shape through its points ("0,0 40,0 20,30"), in its Svg.
924
+
925
+ Holds: nothing. Drawn in: page.
926
+
927
+ Props:
928
+ - `points`: text (required)
929
+
930
+ `style`:
931
+ - `fill`: *color* (default `"#000000"`). Its inside ("transparent" for none).
932
+ - `stroke`: *color*. Its outline's color.
933
+ - `strokeWidth`: a number from 0
934
+ - `opacity`: a number from 0 to 1
935
+
936
+ ### Path
937
+
938
+ A shape drawn by an SVG path (d), in its Svg.
939
+
940
+ Holds: nothing. Drawn in: page.
941
+
942
+ Props:
943
+ - `d`: text (required). SVG path data ("M0 0 L40 0 L20 30 Z").
944
+
945
+ `style`:
946
+ - `fill`: *color* (default `"#000000"`). Its inside ("transparent" for none).
947
+ - `stroke`: *color*. Its outline's color.
948
+ - `strokeWidth`: a number from 0
949
+ - `opacity`: a number from 0 to 1