Styles

Nodes and arrows take an optional style. Leave it out for the default look, and set only the fields you want to change.

Text#

Every label, on nodes and arrows, takes a text style:

"style": {
  "text": { "font": "mono", "size": 16, "color": "blue", "bold": true }
}
FieldValueDefault
font"sans" or "mono""sans"
sizeA number above 0, in world units12
colorA colorFollows the theme, dark on a fill
align"left", "center" or "right""center"
bold, italic, underlinetrue or falsefalse

The style toolbar offers sizes 10, 12, 14, 16, 20, 24, 32. A sticky note without a size fits its text to the note, from 6 to 32.

Borders and fills#

Groups and shapes take a border and a fill:

"style": {
  "border": { "color": "red", "width": 2, "dash": "dashed" },
  "fill": "red"
}
FieldValueDefault
border.colorA color, or "transparent"A group's icon color, or grey for a shape
border.widthA number, in world units2
border.dash"solid", "dashed" or "dotted""solid"
fillA colorNone

A palette name fills with that color's light shade, and a hex color is used as given. A group's fill is drawn behind everything else, and text on a fill is dark unless it has its own color.

Lines and arrowheads#

Arrows take a line, heads and headShape:

"style": {
  "line": { "color": "gray", "width": 2, "dash": "dotted" },
  "heads": "both",
  "headShape": "open"
}

line takes the same color, width and dash as a border, with a default width of 1. heads is "none", "start", "end" or "both", and defaults to "end". headShape sets every head of the arrow:

headShapeHeadIn UML
"filled"A filled triangle, the defaultSynchronous messages
"open"An open VAsynchronous messages, replies, include and extend
"hollow"A larger hollow triangleGeneralization
"cross"A crossLost messages

Colors#

A color is a palette name or a hex color such as "#0ea5e9". "transparent" works for borders only. Each palette color has a line color, for borders, lines and text, and a lighter fill, both the same in light and dark mode:

gray#737373 · #e5e5e5
red#ef4444 · #fecaca
orange#f97316 · #fed7aa
yellow#eab308 · #fef08a
green#22c55e · #bbf7d0
blue#3b82f6 · #bfdbfe
purple#a855f7 · #e9d5ff
pink#ec4899 · #fbcfe8