OptionalbadgesThe main color of the node
OptionalhtmlThe html to be used inside the node as an SVGForeignObject element.
Resolved like every other channel, so a card can be declared at any level —
nodeStyleMap[type].html gives one kind of node a card while the rest keep their
shapes, and a single node's own style overrides that. Returning nothing draws no
card, so one callback can card some nodes and leave the others alone.
Pair it with shape: 'none' for a card that is the node. Otherwise the shape is
still drawn behind it, and size is the smallest the node can be.
The card is measured and the node grows to it, so it is never clipped and edges land
on its border. You do not have to make the returned element self-sizing — it is
measured inside a shrink-to-fit box, so width: 100% resolves against its own
content rather than against the placeholder.
Trusted HTML only. Whatever this returns is inserted as-is, so build it with
textContent (or escape it) rather than interpolating node data into a markup string.
OptionaliconOptionaliconOptionalimageHow an imagePath picture sits on the node's shape. Resolvable per node so
different nodes can mix modes (e.g. screenshots 'cover', other attachments 'icon').
OptionalimageURL of a picture to draw on the node. Restricted to the http:, https:, data: and
blob: schemes; anything else is ignored. Rendering it fetches the URL.
The shape of the node, either a standard shape or a custom SVG path
OptionalstyleCallback to dynamically override style properties based on the node.
Where it sits depends on which style block declares it. On a node's own
style it wins outright, and nodeStyleMap is skipped entirely. On
render.defaultNodeStyle it is the computed form of the default slot: it fills
only what neither the node nor nodeStyleMap set (and what a per-node styleCb
left out), and its result still loses to both.
Runs once per node per render, so keep it cheap.
OptionalsvgInline SVG markup drawn inside the node. Sanitized before it reaches the DOM (scripting
and event handlers are stripped), but a remote <image href> inside it is still fetched
when the node renders — see the security guide.
OptionaltextThe text to be used inside the node as an SVGText element
The horizontal shift applied to the node's label position. A value of 0 means it is centered to the node, a value of 1 is east of the node, -1 is west of the node. Other values are also accepted, e.g., 0.5 would be halfway between the center and the east of the node.
Rotation degree applied to the node's label. Positive values rotate clockwise, negative values rotate counter-clockwise.
Shorten an over-wide label with a middle ellipsis (head…tail); false draws it
in full, on a themed pill where it spills past the node.
The vertical shift applied to the node's label position. A value of 0 means it is centered to the node, a value of 1 is north of the node, -1 is south of the node. Other values are also accepted, e.g., 0.5 would be halfway between the center and the north of the node.
Small indicators pinned to the node's rim, independent of every other channel — see NodeBadge.
Resolved like any other channel: the narrowest declaration wins outright rather than merging, so a node's own
badgesreplaces whatevernodeStyleMapordefaultNodeStylegave it. An empty array is the way to say "this one wears none";undefinedrenders no badge group at all.Four fit on a plain node, two on one with children (the expand affordance reserves the East corners). Anything beyond that collapses into a
+nbadge naming the rest.