Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Rectangles and Ports

<rectangle> creates a general-purpose labeled box.

<rectangle id="service" title="Service" width="180" height="100" font-size="18">
  <port id="service-in" side="left" title="in" font-size="9" />
  <port id="service-out" side="right" title="out" font-size="10" />
</rectangle>

<port> creates a small labeled rectangle inside a side of its parent rectangle. Multiple ports on the same side are spaced evenly.

AttributeTargetDescription
idrectangle, portRequired connection reference ID
width, heightrectangle, portSize in layout pixels
title or textrectangle, portLabel text
font-sizerectangle, portLabel font size
sideporttop, right, bottom, or left
x, yportOptional position relative to parent top-left

Port x and y values are clamped so the port remains inside the parent rectangle.