Design Format
TableCell
Documentation for the TableCell type in the Polotno design JSON Schema.
Type Information
Base Type: object
Properties
| Property | Type | Description |
|---|---|---|
id | string | Unique identifier for the cell. |
type | "tablecell" | Cell type identifier. |
text | string | Visible text shown in the cell. |
opacity | number | Opacity level (0-1). |
rowSpan | number | Number of rows this cell spans. |
colSpan | number | Number of columns this cell spans. |
mergedInto | string | Id of the cell this one is merged into, if any. |
name | string | Display name for the cell. |
custom | unknown | Custom data attached to the cell. |
borders | CellBorders | Per-side border overrides for this cell. |
fontSize | number | Font size in pixels (inherits from the table when omitted). |
fontFamily | string | Font family name (inherits from the table when omitted). |
fontWeight | string | Font weight: 'normal', 'bold', or numeric string (inherits from the table when omitted). |
fontStyle | string | Font style: 'normal' or 'italic' (inherits from the table when omitted). |
textDecoration | string | Text decoration, e.g. underline, line-through (inherits from the table when omitted). |
textTransform | string | Text transform: uppercase, lowercase, capitalize, none (inherits from the table when omitted). |
fill | string | Text color (inherits from the table when omitted). |
align | string | Horizontal alignment: left, center, right, justify (inherits from the table when omitted). |
verticalAlign | string | Vertical alignment: top, middle, bottom (inherits from the table when omitted). |
lineHeight | number | string | Line height multiplier or 'auto' (inherits from the table when omitted). |
letterSpacing | number | Letter spacing as a fraction of font size (inherits from the table when omitted). |
strokeWidth | number | Stroke width in pixels (inherits from the table when omitted). |
stroke | string | Stroke color (inherits from the table when omitted). |
cellBackground | string | Cell background color (inherits from the table when omitted). |
cellPadding | number | Cell padding in pixels (inherits from the table when omitted). |
JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the cell."
},
"type": {
"default": "tablecell",
"description": "Cell type identifier.",
"type": "string",
"const": "tablecell"
},
"text": {
"default": "",
"description": "Visible text shown in the cell.",
"type": "string"
},
"opacity": {
"description": "Opacity level (0-1).",
"type": "number"
},
"rowSpan": {
"description": "Number of rows this cell spans.",
"type": "number"
},
"colSpan": {
"description": "Number of columns this cell spans.",
"type": "number"
},
"mergedInto": {
"description": "Id of the cell this one is merged into, if any.",
"type": "string"
},
"name": {
"description": "Display name for the cell.",
"type": "string"
},
"custom": {
"description": "Custom data attached to the cell."
},
"borders": {
"description": "Per-side border overrides for this cell.",
"type": "object",
"properties": {
"top": {
"description": "Top border override for this cell.",
"type": "object",
"properties": {
"color": {
"description": "Border color for this side.",
"type": "string"
},
"width": {
"description": "Border width in pixels for this side.",
"type": "number"
},
"style": {
"description": "Border style for this side.",
"type": "string",
"enum": [
"solid",
"dashed",
"dotted",
"none"
]
}
}
},
"right": {
"description": "Right border override for this cell.",
"type": "object",
"properties": {
"color": {
"description": "Border color for this side.",
"type": "string"
},
"width": {
"description": "Border width in pixels for this side.",
"type": "number"
},
"style": {
"description": "Border style for this side.",
"type": "string",
"enum": [
"solid",
"dashed",
"dotted",
"none"
]
}
}
},
"bottom": {
"description": "Bottom border override for this cell.",
"type": "object",
"properties": {
"color": {
"description": "Border color for this side.",
"type": "string"
},
"width": {
"description": "Border width in pixels for this side.",
"type": "number"
},
"style": {
"description": "Border style for this side.",
"type": "string",
"enum": [
"solid",
"dashed",
"dotted",
"none"
]
}
}
},
"left": {
"description": "Left border override for this cell.",
"type": "object",
"properties": {
"color": {
"description": "Border color for this side.",
"type": "string"
},
"width": {
"description": "Border width in pixels for this side.",
"type": "number"
},
"style": {
"description": "Border style for this side.",
"type": "string",
"enum": [
"solid",
"dashed",
"dotted",
"none"
]
}
}
}
}
},
"fontSize": {
"description": "Font size in pixels (inherits from the table when omitted).",
"type": "number"
},
"fontFamily": {
"description": "Font family name (inherits from the table when omitted).",
"type": "string"
},
"fontWeight": {
"description": "Font weight: 'normal', 'bold', or numeric string (inherits from the table when omitted).",
"type": "string"
},
"fontStyle": {
"description": "Font style: 'normal' or 'italic' (inherits from the table when omitted).",
"type": "string"
},
"textDecoration": {
"description": "Text decoration, e.g. underline, line-through (inherits from the table when omitted).",
"type": "string"
},
"textTransform": {
"description": "Text transform: uppercase, lowercase, capitalize, none (inherits from the table when omitted).",
"type": "string"
},
"fill": {
"description": "Text color (inherits from the table when omitted).",
"type": "string"
},
"align": {
"description": "Horizontal alignment: left, center, right, justify (inherits from the table when omitted).",
"type": "string"
},
"verticalAlign": {
"description": "Vertical alignment: top, middle, bottom (inherits from the table when omitted).",
"type": "string"
},
"lineHeight": {
"description": "Line height multiplier or 'auto' (inherits from the table when omitted).",
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"letterSpacing": {
"description": "Letter spacing as a fraction of font size (inherits from the table when omitted).",
"type": "number"
},
"strokeWidth": {
"description": "Stroke width in pixels (inherits from the table when omitted).",
"type": "number"
},
"stroke": {
"description": "Stroke color (inherits from the table when omitted).",
"type": "string"
},
"cellBackground": {
"description": "Cell background color (inherits from the table when omitted).",
"type": "string"
},
"cellPadding": {
"description": "Cell padding in pixels (inherits from the table when omitted).",
"type": "number"
}
},
"required": [
"id"
]
}