Documentation Index Fetch the complete documentation index at: https://docs.autype.com/llms.txt
Use this file to discover all available pages before exploring further.
Tables display structured data in rows and columns with optional headers, styling, captions, and variable data binding.
Basic table
{
"type" : "table" ,
"headers" : [ "Name" , "Role" , "Email" ],
"rows" : [
[ "Alice" , "Engineer" , "alice@example.com" ],
[ "Bob" , "Designer" , "bob@example.com" ]
]
}
Properties
Property Type Required Default Description typestring Yes — Must be "table" idstring No — Unique identifier. Auto-generated if not provided. Max: 100 chars. headersarray No — Header row cells. Max: 20 cells. rowsarray No — Data rows. Each row is an array of cells. Max: 100 rows, 20 cells per row. dataSourcestring No — Bind to a table variable instead of inline rows. See Variable data binding . mappingstring[] No — Column keys to select from the data source. Max: 20 items. captionstring No — Caption text for table numbering (e.g., "Revenue by quarter"). Max: 500 chars. anchorstring No — Anchor ID for internal references (e.g., "tab-revenue"). Pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$. Max: 100 chars. invisibleboolean No falseHide all borders and backgrounds (borderless table). hideHeadersboolean No falseHide the header row. styleobject No — Inline table style override. See Table style . spacingobject No — Spacing override with before and after in pt (0–100).
Each cell in headers and rows can be either a simple string or a cell object:
Simple string:
[ "Alice" , "Engineer" , "alice@example.com" ]
Cell object (for alignment or embedded images):
[
{ "text" : "Alice" , "align" : "left" },
{ "text" : "Engineer" , "align" : "center" },
{ "image" : { "src" : "https://example.com/photo.png" , "width" : 40 , "height" : 40 } }
]
Cell object properties
Property Type Description textstring Cell text content. Max: 1000 chars. Supports {{varName}} substitution. imageobject Embedded cell image (see below). alignstring Cell alignment: "left", "center", or "right"
Cell image properties
Property Type Description srcstring Image URL. Max: 2000 chars. captionstring Alt text. Max: 200 chars. widthnumber Width in px (10–1000). heightnumber Height in px (10–1000).
Variable data binding
Instead of defining rows inline, bind a table to a table variable via dataSource. Use mapping to select and reorder columns.
{
"variables" : {
"employees" : {
"type" : "table" ,
"columns" : [ "name" , "department" , "email" , "salary" ],
"data" : [
[ "Alice" , "Engineering" , "alice@example.com" , "$120k" ],
[ "Bob" , "Marketing" , "bob@example.com" , "$95k" ]
]
}
},
"sections" : [{
"type" : "flow" ,
"content" : [{
"type" : "table" ,
"headers" : [ "Name" , "Department" ],
"dataSource" : "employees" ,
"mapping" : [ "name" , "department" ]
}]
}]
}
When mapping is provided, only the specified columns (matched by name against the variable’s columns) are included. Without mapping, all data columns are used as-is.
Table style
Override the default table styling inline via the style property. This has the same structure as defaults.styles.table.
{
"type" : "table" ,
"headers" : [ "Plan" , "Price" ],
"rows" : [[ "Starter" , "$9" ], [ "Pro" , "$29" ]],
"style" : {
"borders" : {
"outer" : { "width" : 1 , "color" : "#000000" , "style" : "solid" },
"inner" : { "width" : 0.5 , "color" : "#DDDDDD" , "style" : "solid" }
},
"header" : {
"backgroundColor" : "#1a1a2e" ,
"color" : "#FFFFFF" ,
"fontWeight" : "bold"
},
"rows" : {
"alternateBackgroundColor" : "#F5F5F5"
},
"cellPadding" : { "top" : 6 , "right" : 8 , "bottom" : 6 , "left" : 8 }
}
}
Full table style properties
borders.outer / borders.inner Property Type Description widthnumber Border width in pt (0–10). colorstring Border color in hex. stylestring "solid", "dashed", or "dotted"
header Property Type Description backgroundColorstring Header background color in hex. colorstring Header text color in hex. fontSizenumber Header font size in pt (6–72). fontWeightstring "normal" or "bold"fontStylestring "normal" or "italic"alignstring "left", "center", or "right"
rows Property Type Description backgroundColorstring Row background color in hex. alternateBackgroundColorstring Alternate row background for striped tables. colorstring Row text color in hex. fontSizenumber Row font size in pt (6–72). fontWeightstring "normal" or "bold"fontStylestring "normal" or "italic"alignstring "left", "center", or "right"
cellPadding Property Type Description topnumber Top padding in pt (0–50). rightnumber Right padding in pt (0–50). bottomnumber Bottom padding in pt (0–50). leftnumber Left padding in pt (0–50).
Captions and anchors
Add a caption for automatic table numbering and an anchor for cross-referencing.
{
"sections" : [{
"type" : "flow" ,
"content" : [
{
"type" : "table" ,
"caption" : "Quarterly revenue" ,
"anchor" : "tab-revenue" ,
"headers" : [ "Q1" , "Q2" , "Q3" , "Q4" ],
"rows" : [[ "$100k" , "$120k" , "$115k" , "$140k" ]]
},
{ "type" : "text" , "text" : "As shown in [Table 1](#tab-revenue), revenue grew steadily." }
]
}]
}
The caption prefix (e.g., “Table”) and style are controlled by defaults.styles.tableCaption. See Defaults — Table caption style .
Defaults
Tables without an inline style inherit from defaults.styles.table:
{
"defaults" : {
"styles" : {
"table" : {
"borders" : {
"outer" : { "width" : 1 , "color" : "#000000" },
"inner" : { "width" : 0.5 , "color" : "#DDDDDD" }
},
"header" : { "backgroundColor" : "#F0F0F0" , "fontWeight" : "bold" },
"rows" : { "alternateBackgroundColor" : "#FAFAFA" },
"cellPadding" : { "top" : 4 , "right" : 6 , "bottom" : 4 , "left" : 6 }
},
"tableCaption" : { "fontSize" : 9 , "fontStyle" : "italic" , "prefix" : "Table" }
}
}
}