Deployment diagrams: 3D boxes

Deployment diagrams: 3D boxes

puml.online

Introduction

UML deployment diagrams use a very particular kind of box: a 3D cube with a slanted lid. It is not a rounded rectangle with a drop shadow — it is an actual cube projection, with the top and side faces picked out by extra line segments. This is the standard UML drawing for a Node, and it has looked like this for decades.

So the question is: who is responsible for drawing that 3D look? Is it a fixed style baked into the engine, or do you have to write something to switch it on? In this post we draw the same topology — an edge node, an application cluster, a database, object storage and static assets — in both PlantUML and Mermaid, then take the rendered SVG apart and count the <polygon>s and <line>s. Geometry facts instead of impressions.

Short version: PlantUML’s node keyword renders as a 3D box automatically, with no extra configuration; Mermaid has no concept of “3D” at all, and its closest relative, architecture-beta, still draws flat 2D icon blocks.

PlantUML

A PlantUML deployment diagram needs no wrapper syntax. Just write node, and you get the classic cube-with-a-lid:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@startuml
skinparam node {
BackgroundColor #E8F0FE
BorderColor #4285F4
}

node "Edge Node" as edge {
artifact "nginx.conf"
}

node "App Cluster" as app {
artifact "api.jar"
}

database "PostgreSQL" as db
cloud "Object Storage" as oss
folder "Static Assets" as static

edge --> app : HTTPS
app --> db : JDBC
app --> oss : S3 API
edge --> static : CDN
@enduml

This measured HTTP 200 and produced 5 entities with all labels present (Edge Node, nginx.conf, api.jar, PostgreSQL, Object Storage, Static Assets, plus HTTPS / JDBC / S3 API / CDN on the four edges).

Where does the 3D box come from? The SVG answers this precisely. A lone node "X" as x renders an entity containing exactly two kinds of primitive: one <polygon> with 7 vertices (7,17 17,7 128.7,7 128.7,43.3 118.7,53.3 7,53.3 7,17), and three <line> elements drawing the lid’s slant, its top edge and its right vertical edge.

So the slanted lid is not decoration painted on top — it is the extra face of the box itself. The shape is independent of position: a lone node, two linked nodes, or a node nested inside a package, the lid is always there.

What is actually 2D? Swap the keyword and the box collapses into a plane. Measured in the same run:

PlantUML keyword Rendered primitives 3D?
node 1 × <polygon> + 3 × <line> Yes, cube with a lid
component 4 × <rect> No, flat rectangle with side tabs
rectangle 1 × <rect> No, plain rectangle
artifact 1 × <polygon> + 1 × <rect> + 2 × <line> No, folded-corner document
database 1 × <rect> + 4 × <path> + 1 × <line> No, cylinder
cloud 1 × <path> No, cloud
folder 1 × <path> + 1 × <line> No, folder
frame 1 × <rect> + 1 × <path> No, frame
usecase 1 × <ellipse> No, ellipse
file 2 × <path> No, document

In PlantUML, then, “3D or not” is a keyword choice: node gives you 3D, component / rectangle give you 2D.

Four things that look like they should work but measurably do not:

  • nodeStyle 3D → HTTP 400, Syntax Error? (Assumed diagram type: sequence). The keyword does not exist.
  • rectangle3D "X" as x → HTTP 400, also does not exist.
  • skinparam nodeStyle 3D → HTTP 200, but the geometry is completely unchanged (still 1 × <polygon> + 3 × <line>). This one is the real trap: it does not error, so it looks like it worked — but you just enabled nothing, because node was already 3D.
  • node "X" <<3D>> as x → HTTP 200, geometry likewise unchanged. <<3D>> just prints an extra «3D» text line above the box (the measured SVG does contain a «3D» text node). It is a label, not a shape switch.

One more packaging trap. The deployment diagram above deliberately avoids a deployment diagram { ... } wrapper — because on this backend it fails outright with HTTP 400, reporting Syntax Error? (Assumed diagram type: sequence). All four spellings — deployment { }, deployment diagram { }, deployment "Title" { }, deployment Title { } — produce the same error (and the error helpfully guesses “sequence diagram”, which is misleading: you were trying to draw a deployment diagram). On api.puml.online’s current PlantUML 1.2026.6, a deployment diagram is just a bare set of node statements, with no outer container.

Mermaid

Mermaid has no concept of “3D” whatsoever. Its primitives are a 2D shape library: nodes are rectangles or rounded rectangles, never with a lid, a side face or a projection.

The closest available thing is architecture-beta (Mermaid 11’s new architecture diagram type), using service for services and group for groupings:

1
2
3
4
5
6
7
8
9
10
11
12
architecture-beta
group edge(cloud)[Edge Network]
service lb(server)[Load Balancer] in edge
service web(server)[Web Server] in edge
group core(cloud)[Private VPC]
service api(server)[API Server] in core
service db(database)[PostgreSQL] in core
service oss(disk)[Object Storage] in core
lb:R -- L:web
web:R -- L:api
api:R -- L:db
api:R -- L:oss

Measured (Chrome headless + Mermaid 11.4.1): 5 services, 2 groups, 4 edges, identical across 5 consecutive runs.

But it is 2D. Take a service apart in the rendered output: totalPolygon = 0 — not a single polygon. What you get instead are <rect> and <path> elements forming an icon (server draws a server, database a database, disk a disk). Mermaid signals “this is a database” through icon vocabulary, not through solid geometry. That is a fundamentally different visual language: PlantUML tells you “this is a deployment node” through shape, Mermaid tells you “this is a database” through an icon.

Three things that bite in practice:

  • Version floor. architecture-beta is a Mermaid 11 diagram type. The site’s editor bundles Mermaid 10.9.1, and writing it there fails outright: No diagram type detected matching given configuration for text: architecture-beta. Only the theme’s 11.4.1 recognises it. Check the reader’s version before pasting code into an article.
  • Do not use the icon: prefix. service db(icon:database)[Database] renders a literal question mark ? in 11.4.1 (the measured SVG contains <tspan>?</tspan>) because the icon font is not bundled. The prefix-free (database) form is the correct one — it draws a real database icon, and the SVG is much bigger as a result (6370 bytes vs 3407, which confirms a real icon rather than a placeholder).
  • Groups must be declared first. Pointing in <group> at a group you never declared gives: The service [db]'s parent does not exist. Please make sure the parent is created before this service. Reproduced identically 3 times in a row.

The universally safe fallback: flowchart + subgraph. If you need code that runs on both versions, simulate the grouping with flowchart. Both 10.9.1 and 11.4.1 render it fine:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
flowchart LR
subgraph edge["Edge Network"]
lb[Load Balancer]
web[Web Server]
end
subgraph core["Private VPC"]
api[API Server]
db[(PostgreSQL)]
oss[(Object Storage)]
end
lb --> web
web --> api
api --> db
api --> oss

A subgraph draws a dashed rounded rectangle (stroke-dasharray:8) — explicitly 2D — but it renders on both versions and the grouping semantics are complete.

Side by side

Dimension PlantUML Mermaid
3D box node automatically gets a slanted lid (1 × <polygon> + 3 × <line>) No 3D concept; nodes are always 2D shapes
How to get 3D Choose the keyword (node vs component / rectangle) Not possible; architecture-beta is 2D too
Source of the solid look Geometry (a cube projection) Icon vocabulary (server / database / disk icons)
False switches skinparam nodeStyle 3D does not error but does nothing; <<3D>> only prints one extra text line icon: prefix renders a ? placeholder in 11.4.1
Deployment container On the current backend every deployment { } spelling is HTTP 400 No container needed; group handles grouping
Grouping node "X" { artifact ... } nesting group + service ... in <group> (group must be declared first)
Version requirement Verified working on PlantUML 1.2026.6 architecture-beta needs Mermaid ≥ 11; 10.9.1 reports No diagram type detected
Cross-version safe form node + skinparam flowchart + subgraph (passes on both 10.9.1 / 11.4.1)

Wrap-up

PlantUML bakes 3D into the syntax; Mermaid bakes it into neither the syntax nor the renderer.

On the PlantUML side, the solid UML deployment node is a fixed built-in shape: node gives you the cube projection, component gives you a flat rectangle, and picking a keyword is picking a drawing style. There is no switch to flip — nodeStyle 3D and rectangle3D are non-existent keywords (400), and a “does not error but does nothing” line like skinparam nodeStyle 3D is the genuine time sink; <<3D>> is even more innocent, just a «3D» tag stuck on the box with no effect on solidity whatsoever.

On the Mermaid side, architecture-beta is currently the closest thing to a deployment diagram. Its semantics are genuinely good — services, groups, edges with explicit direction (lb:R -- L:web) — but it draws icons, not boxes. If you want a cube, Mermaid cannot give you one; the most you get is a dashed rounded rectangle (subgraph) or a rounded rectangle. There is also a version floor: it arrived in Mermaid 11, and the 10.9.1 bundled with the site editor simply reports No diagram type detected.

Choosing: if the picture has to say “this is a topology deployed across these machines”, use PlantUML’s node — the 3D box is the native UML expression, and readers instantly recognise it as a deployment diagram rather than an ordinary flowchart. If the code has to live in docs, CI, or a Mermaid 10.x environment, use flowchart + subgraph — you lose the solidity but gain the guarantee that it renders everywhere, and the grouping semantics survive intact. Once Mermaid 11 becomes the baseline, architecture-beta is the more professional choice — just accept that it is 2D as well.

  • Title: Deployment diagrams: 3D boxes
  • Author: puml.online
  • Created at : 2026-12-03 01:00:00
  • Updated at : 2026-12-06 10:29:22
  • Link: https://puml.online/en/blog/deployment-diagram-3d-boxes/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Deployment diagrams: 3D boxes