| Shape | Description | Typical Use |
|---|
rectangle | Standard box, square corners | Most element types |
rounded | Box with rounded corners | Active elements, processes |
note | Box with folded corner | Note annotations |
boundary | Dashed-border region, no fill | Visual grouping |
text | No border or background | Labels, headings |
| Field | Type | Description |
|---|
type | "element" | Always “element” for element types |
icon | String (SVG) | SVG markup for the type icon |
color | String (hex) | Default fill colour |
shape | String | Node shape (see above) |
stereotype | String | Label text for stereotype display |
defaultWidth | Number | Initial width in pixels |
defaultHeight | Number | Initial height in pixels |
defaultBorderWidth | Number | Border width in pixels |
textHAlign | "left" / "center" / "right" | Horizontal text alignment |
textVAlign | "top" / "middle" / "bottom" | Vertical text alignment |
autoSizeCompartment | Boolean | Auto-resize based on content |
compartments | Array | Compartment definitions (see below) |
subordinateTypes | Array | Owned element type definitions (see below) |
| Field | Type | Description |
|---|
type | "relationship" | Always “relationship” |
icon | String (SVG) | Icon for palette and explorer |
lineStyle | "solid" / "dashed" / "dotted" | Edge line style |
sourceMarker | "none" / "arrow" / "hollowArrow" | Marker at source end |
targetMarker | "none" / "arrow" / "hollowArrow" | Marker at target end |
color | String (hex) | Default edge colour |
s2tVerb | String | Source-to-target verb (e.g., “serves”) |
t2sVerb | String | Target-to-source verb (e.g., “is served by”) |
showMultiplicities | Boolean | Display multiplicity labels |
showRoleNames | Boolean | Display role name labels |
Compartments define sections within a diagram node.
| Field | Type | Description |
|---|
contentType | "name" / "properties" / "subordinates" | What to display |
id | String | Unique compartment identifier |
label | String | Heading text (for subordinate compartments) |
showLabel | Boolean | Whether to display the heading |
subordinateTypeId | String | References a subordinate type (when contentType = “subordinates”) |
style | Object | CSS-like style overrides (fontWeight, etc.) |
Define owned element types that render inside compartments.
| Field | Type | Description |
|---|
id | String | Unique identifier referenced by compartments |
label | String | Display label |
classifier | String | $id of the owned element type |
displayTemplate | String | Template for rendering (e.g., {name} : {Data Type}) |
Stereotypes display the M2 type name on diagram nodes (e.g., <<Application Component>>). Visibility is toggled per-diagram via the toolbar.
- M2 notation colour — the default fill colour for all instances of a type
- M1 diagram override — per-element, per-diagram colour override
- Revert — removes the override, restoring the M2 default
- Colours are specified as hex strings (e.g.,
#81D4FA)