Skip to content

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.

Input Node
Group Node
Output Node
Default Node
Any Other Type
Arrow keys move the view, Home shows the whole flow.
bit Blow

Try 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

  • Type selects the built-in renderer: "input", "default" (the default value), "output" or "group". Without a NodeTemplate, 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 on TargetPosition (Top by default) and SourcePosition (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 in ParentId, and their Position is relative to its top-left corner. It needs an explicit Width and Height, as it has no content to size it.
  • Every node element carries bit-blow-node and bit-blow-node-{Type}, so .bit-blow-node-output or .bit-blow-node-note restyles one type. The rules here use the --bit-blow-* custom properties, so they follow the light and dark modes.
  • The canvas's Class parameter adds a class to its root element; the checkbox switches dn-restyled on and off, and every rule is scoped under it.
An unhandled error has occurred. Reload 🗙