Skip to content

Layout object ​

position (on a device) and layout (on a NIC, port group, phase or inlet) use the object syntax: double braces, comma-separated key: value pairs, numbers only.

position={{ x: 100, y: 200 }}
layout={{ x: 0, y: 0, cols: 8, groupSize: 4, rows: 2 }}
layout={{ x: 360, y: 12, cols: 1, w: 60 }}
FieldUsed inValid values / description
xbothNumber: horizontal position
ybothNumber: vertical position
colslayoutWhole number: columns in the port grid
groupSizelayoutWhole number: put a gap after every N columns
rowslayoutWhole number ≥ 1: rows in the grid (fills column by column)
wlayoutNumber: width of the group's box, in card units. Ports are fitted inside
hlayoutNumber: height of the group's box, in card units

Card units and millimetres ​

layout values are in card units, measured from the top-left of the faceplate:

  • 424 units across the standard 19" chassis width (440 mm);
  • 84 units per rack unit down (44.45 mm, 1U).

The Materials editor draws faceplates to scale and shows sizes in millimetres, converting with these ratios. For example an OCP NIC 3.0 SFF card, 76 mm wide, is w: 73.24.

A device whose cardWidth is not 424 was drawn before every chassis became the standard width; on load its groups' x and w are rescaled by 424 / cardWidth.

Rows and columns ​

  • Without rows: the group is cols ports wide, with as many rows as needed, filled left to right, then top to bottom.
  • With rows: exactly that many rows, filled top to bottom, then left to right — ports 1 and 2 stacked, as on a switch. If rows × cols cannot hold every port, the grid grows to ceil(ports / rows) columns, so ports never overlap.

groupSize splits the columns into groups with a gap between them in both cases.

How rows face ​

With more than one row, each row is drawn right way up or upside down (latch on the other side), like a switch with rows stacked belly to belly. Set it with attributes on the group's element, not inside layout:

AttributeValid valuesDescription
facingalternate, up, downalternate: blocks of rows take turns, first up, then down. up / down: every row the same way
adjacentRowswhole number ≥ 1, default 1With alternate, how many rows in a block face the same way. 2 with 4 rows is up, up, down, down

Without facing, a group with rows alternates, and one without faces up. A single row always faces up. Both attributes are only read alongside a layout.

xml
<PortGroup label="ports" portCount="64" speed="800G" connector="OSFP"
           layout={{ x: 12, y: 0, cols: 16, groupSize: 4, rows: 4 }}
           facing="alternate" adjacentRows="2" />

Port alignment ​

When a group's box is wider than its ports (stretched with w), align on the group's element says where the ports sit:

ValueDescription
leftAgainst the left edge (default)
centerCentred
rightAgainst the right edge
xml
<Nic label="cx7-1" portCount="1" speed="400G" connector="OSFP"
     layout={{ x: 360, y: 12, cols: 1, w: 60 }} align="right" />

Without w/h the box is exactly as large as its port grid, so align changes nothing.