Design Format
Element
Documentation for the Element type in the Polotno design JSON Schema.
Type Information
Base Type: union
Variants
A value of this type is one of:
- TextElement
- ImageElement
- SVGElement
- LineElement
- FigureElement
- GifElement
- LottieElement
- VideoElement
- TableElement
- GroupElement
JSON Schema
This compact summary checks only the element type discriminator. Use the complete schema from @polotno/schema/design.schema.json to validate element properties.
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "text"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "image"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "svg"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "line"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "figure"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "gif"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "lottie"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "video"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "table"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "group"
}
},
"required": [
"type"
]
}
]
}