Add defaultPorts to node declaration, such as { type: 'input', location: 'left' }, which will add an input port on the left side of the node
Add useDynamicPort to node declaration, when set to true it will look for DOM elements with data-port-id and data-port-type attributes on the node DOM as ports
Below, the condition node listens to portKeys data and updates ports data via Form Effect, details see Demo
Ports are ultimately rendered through the WorkflowPortRender component, supporting custom styles, or you can reimplement this component based on the source code. Refer to Free Layout Best Practices - Node Rendering
You can customize port colors by passing color props to WorkflowPortRender:
primaryColor - Active state color (linked/hovered)secondaryColor - Default state colorerrorColor - Error state colorbackgroundColor - Background color