# Swimlane

> Create swimlane (cross-functional) diagrams with horizontal rows representing actors, departments, or roles, and flowchart nodes positioned within them.

Source: https://mockflow.com/developers/reference/item-types/swimlane

Send `"type": "swimlane"`.

Create swimlane (cross-functional) diagrams with horizontal rows representing actors, departments, or roles, and flowchart nodes positioned within them.

Also available as the MCP tool `render_swimlane`. The same payload works through either surface.

### Fields

- `class` (string, required): Always 'GraphLinksModel'
- `swimlaneRows` (object[], required): Array of horizontal swim lane definitions
    - `id` (string, required): Unique row ID (e.g., "row_1")
  - `title` (string, required): Lane label (actor, department, role)
  - `color` (string, required): Background color (soft pastel hex)
- `nodeDataArray` (object[], required): Array of flowchart nodes assigned to swim lanes
    - `key` (string, required): Unique node identifier
  - `text` (string, required): Node label
  - `row` (string, required): swimlaneRows id this node belongs to
  - `loc` (string, required): Position as "x y" string
  - `width` (number): 120 for processes, 100 for diamonds
  - `height` (number): 60 for processes, 80 for diamonds
  - `shape` (enum<string>, required): Node shape. One of `RoundedRectangle`, `Diamond`, `Ellipse` or `Rectangle`.
  - `color` (string, required): Node hex color
- `linkDataArray` (object[], required): Array of connections between nodes
    - `from` (string, required): Source node key
  - `to` (string, required): Target node key
  - `fromSpot` (enum<string>, required): One of `Top`, `Bottom`, `Left` or `Right`.
  - `toSpot` (enum<string>, required): One of `Top`, `Bottom`, `Left` or `Right`.
  - `text` (string): Link label (e.g., "Yes", "No")
  - `segmentFraction` (number): 0.1-0.9, label position along the path — give adjacent labelled links different values (0.35 / 0.65) so labels do not stack

## Example

```json
{
  "type": "swimlane",
  "data": {
    "class": "string",
    "swimlaneRows": [
      {
        "id": "string",
        "title": "Q4 Launch Planning",
        "color": "string"
      }
    ],
    "nodeDataArray": [
      {
        "key": "string",
        "text": "Interview 5 users",
        "row": "string",
        "loc": "string",
        "width": 0,
        "height": 0,
        "shape": "RoundedRectangle",
        "color": "string"
      }
    ],
    "linkDataArray": [
      {
        "from": "string",
        "to": "string",
        "fromSpot": "Top",
        "toSpot": "Top",
        "text": "Interview 5 users",
        "segmentFraction": 0
      }
    ]
  }
}
```
