Default Nodes
The four built-in node types, picked by BlowNode.Type with no template at all: input, default, output and group. Every node also carries a bit-blow-node-{Type} class, so any type - even one the canvas does not know - can be restyled with CSS alone.
Press Tab to move between the nodes and edges of the diagram.
Press Enter or Space to select it, Shift with Enter to add it to the selection, the arrow keys to move the selected nodes, Delete to remove them and Escape to clear the selection. Press C to start a connection from it.
Press Enter or Space to select it, Delete to remove it and Escape to clear the selection. Press C to move its end to another node.
bit BlowTry it
- Compare the handles: Input Node has a dot only at the bottom, Output Node only at the top, and the two nodes inside the group have both.
- Drag the group by its background or its label: the two nodes inside it move with it.
- Drag from a handle to connect two nodes: a connection always joins a source handle (bottom) to a target handle (top), so the group, which has neither, takes no part.
- Tick restyle each type with CSS: the input and output nodes take a tint of their border colour, default nodes turn into pills, the node of an unknown type turns amber and the group gets a solid border - all from a few CSS rules on this page, with no change to the nodes.
How it works
Typeselects the built-in renderer:"input","default"(the default value),"output"or"group". Without aNodeTemplate, any other value -"note"here - is drawn like"default".- The built-in nodes show
Label- input, default and output nodes fall back to the id when there is none - and place their handles onTargetPosition(Topby default) andSourcePosition(Bottom). - A
"group"node is translucent and dashed, with its label in the corner and no handles - the usual parent of a sub-flow. Its children name it inParentId, and theirPositionis relative to its top-left corner. It needs an explicitWidthandHeight, as it has no content to size it. - Every node element carries
bit-blow-nodeandbit-blow-node-{Type}, so.bit-blow-node-outputor.bit-blow-node-noterestyles one type. The rules here use the--bit-blow-*custom properties, so they follow the light and dark modes. - The canvas's
Classparameter adds a class to its root element; the checkbox switchesdn-restyledon and off, and every rule is scoped under it.