Skip to main content

Elements

A page element is anything that appears on a page — a text block, an image, a shape, a table, a group. All elements share a common set of baseline properties (identity, geometry, fill, stroke, shadow, opacity, blend mode). The type field on every element determines which additional, type-specific fields are present.

Element Types

There are 10 element types:

typeDescription
groupA container grouping other elements
circleCircle / ellipse
roundedrectRectangle with optional corner radius
triangleTriangle
lineLine segment
imageRaster image
tableTabular layout
richRich-text block with inline formatting
pathArbitrary SVG-style path
polyPolygon
Legacy value circel

Older documents may carry the misspelled circel as their circle type. The validator still accepts this value on input for backward compatibility, but new documents should emit circle.

Shared Properties

Every element carries this baseline (abbreviated list):

Identity & Naming

  • id (numeric, unique in page), uuid (UUID), name

Geometry

  • nativeRect — authoritative bounds
  • screenRect, screenSavedRect — editor display rects
  • angle — rotation
  • rotationCx, rotationCy — rotation center
  • handles, rotatedHandles — resize/rotate handles

Fill, Stroke & Gradient

Elements reference swatches the same way pages do:

  • fillSwatchUuid, fillTintValue — solid fill
  • strokeSwatchUuid, strokeTintValue, nativeBorderSize, strokeDash — border
  • nativeGradientFillStart, nativeGradientFillLength, gradientFillAngle — gradient fill
  • Matching ...Stroke... fields for gradient strokes

Shadows

  • shadow (bool), shadowSwatchUuid, shadowAngle
  • nativeShadowLength, nativeShadowOffsetX, nativeShadowOffsetY, nativeShadowBlur

Blend & Opacity

  • opacity (0–1)
  • blendMode — one of 26 blend modes (see below)

Behavior & State

  • locked, hidden, selected, highlighted
  • autoLayout — auto-layout container configuration (for groups that behave as layouts)
  • autoSize — auto-resizing rules
  • layerInfo, editOptions — editor-only metadata

Blend Modes

The blendMode field accepts 26 values mirroring the canvas compositing operations:

color, color-burn, color-dodge, copy, darken, destination-atop, destination-in,
destination-out, destination-over, difference, exclusion, hard-light, hue, lighten,
lighter, luminosity, multiply, overlay, saturation, screen, soft-light,
source-atop, source-in, source-out, source-over, xor

Any other value is rejected by the validator.

Type-Specific Fields

Each subclass adds its own fields — for example:

  • image elements hold an image URL/reference plus crop, scale, and color-correction fields
  • rich elements hold formatted text runs, font settings (fontName, fontSize, fontStyle, defaultFont), and inline Tag markup
  • table elements hold row/column structure and per-cell style

For the exact field set of each element type, send a sample payload to POST /v1/document/validate — the returned violations pinpoint any missing or misnamed fields.