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 }
}| Field | Value | Default |
|---|---|---|
font | "sans" or "mono" | "sans" |
size | A number above 0, in world units | 12 |
color | A color | Follows the theme, dark on a fill |
align | "left", "center" or "right" | "center" |
bold, italic, underline | true or false | false |
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"
}| Field | Value | Default |
|---|---|---|
border.color | A color, or "transparent" | A group's icon color, or grey for a shape |
border.width | A number, in world units | 2 |
border.dash | "solid", "dashed" or "dotted" | "solid" |
fill | A color | None |
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:
headShape | Head | In UML |
|---|---|---|
"filled" | A filled triangle, the default | Synchronous messages |
"open" | An open V | Asynchronous messages, replies, include and extend |
"hollow" | A larger hollow triangle | Generalization |
"cross" | A cross | Lost 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 · #e5e5e5red#ef4444 · #fecacaorange#f97316 · #fed7aayellow#eab308 · #fef08agreen#22c55e · #bbf7d0blue#3b82f6 · #bfdbfepurple#a855f7 · #e9d5ffpink#ec4899 · #fbcfe8