Skip to main content

Element Types

| Type | Use For | |------|---------|| | rectangle | Processes, actions, components | | ellipse | Entry/exit points, external systems | | diamond | Decisions, conditionals | | arrow | Connections between shapes | | text | Labels inside shapes | | line | Non-arrow connections | | frame | Grouping containers |

Common Properties

All elements share these:
PropertyTypeDescription
idstringUnique identifier
typestringElement type
x, ynumberPosition in pixels
width, heightnumberSize in pixels
strokeColorstringBorder color (hex)
backgroundColorstringFill color (hex or “transparent”)
fillStylestring”solid”, “hachure”, “cross-hatch”
strokeWidthnumber1, 2, or 4
strokeStylestring”solid”, “dashed”, “dotted”
roughnessnumber0 (smooth), 1 (default), 2 (rough)
opacitynumber0-100
seednumberRandom seed for roughness

Text-Specific Properties

PropertyDescription
textThe display text
originalTextSame as text
fontSizeSize in pixels (16-20 recommended)
fontFamily3 for monospace (use this)
textAlign”left”, “center”, “right”
verticalAlign”top”, “middle”, “bottom”
containerIdID of parent shape

Arrow-Specific Properties

PropertyDescription
pointsArray of [x, y] coordinates
startBindingConnection to start shape
endBindingConnection to end shape
startArrowheadnull, “arrow”, “bar”, “dot”, “triangle”
endArrowheadnull, “arrow”, “bar”, “dot”, “triangle”

Binding Format

{
  "elementId": "shapeId",
  "focus": 0,
  "gap": 2
}

Rectangle Roundness

Add for rounded corners:
"roundness": { "type": 3 }

Build docs developers (and LLMs) love