Eriksen Labs Support
Documentation

PlantUML reference

v2.10.0Updated

What the PlantUML in our Confluence diagrams app draws: each kind of diagram and its start line, every line of the editor's syntax reference, and the limits. For a gentle start, read Learn PlantUML first.

On this page
  1. The kinds of diagram
  2. Libraries
  3. Every line, by kind
  4. Themes
  5. Icons and emoji
  6. What is not drawn
  7. Limits
  8. Which PlantUML

The kinds of diagram

The editor has an example of each kind below. The first eight are buttons; the rest are under More…. The start line is the diagram's first line, and its end line matches it: @startuml ends with @enduml, @startgantt with @endgantt, and so on.

Kinds of PlantUML diagram in the editor
In the editorKindStart lineWhere
SequenceSequence diagram@startumlButton
ClassClass diagram@startumlButton
ActivityActivity diagram@startumlButton
ComponentComponent diagram@startumlButton
StateState diagram@startumlButton
Use caseUse case diagram@startumlButton
GanttGantt chart@startganttButton
Mind mapMind map@startmindmapButton
DeploymentDeployment diagram@startumlMore…
C4C4 model diagram, with the C4 library@startumlMore…
ObjectObject diagram@startumlMore…
Entity relationshipEntity relationship diagram@startumlMore…
Chen EREntity relationship diagram in Chen's notation@startchenMore…
TimingTiming diagram@startumlMore…
NetworkNetwork diagram@startnwdiagMore…
Work breakdownWork breakdown structure@startwbsMore…
JSONJSON data@startjsonMore…
YAMLYAML data@startyamlMore…
WireframeWireframe (Salt)@startsaltMore…
ArchiMateArchiMate diagram@startumlMore…
EBNFEBNF grammar@startebnfMore…
RegexRegular expression@startregexMore…

Libraries

Three libraries ship with the app. Write the include line with the library's name in angle brackets, on a line after the start line. Nothing is fetched from the web.

C4

For C4 model diagrams of a system's people, containers and links. The editor's C4 example, under More…, starts with !include <C4/C4_Container>. Its lines are in the C4 table below. C4 colors its own boxes, so a C4 diagram is put on a light ground, like a diagram with a light theme. A C4 include from a web address gets "write !include <C4/…> instead".

ArchiMate

!include <archimate/Archimate>, then the library's own words, such as Business_Actor(customer, "Customer"). The editor's ArchiMate example uses PlantUML's own archimate keyword and needs no include.

Kubernetes

The Kubernetes sprites. Include a set, such as !include <kubernetes/k8s-sprites-unlabeled-25pct>, then put a sprite in a label as <$pod> or <$svc>. The sets are k8s-sprites-unlabeled-25pct, -50pct and -full, and the same three as k8s-sprites-labeled-….

Other libraries, such as AWS, Azure and the icon sets, are not included (see What is not drawn).

Every line, by kind

These are the lines the editor's Syntax reference shows, kind by kind. The editor shows only the list for the kind you are writing. A "…" stands for text of your own. Each line was drawn with the app's PlantUML, inside a diagram of its kind, before this page was published.

Any diagram

WriteWhat it does
@startuml
Alice -> Bob : Hello
@enduml
The frame every diagram is written in
title Orders A title
' not drawn A comment: a line that starts with an apostrophe
Alice -> Bob : Hello
note right : …
A note
participant Bob #LightBlue A color, by name or as #RRGGBB
skinparam backgroundColor #FEFEFE A setting for the whole drawing
!theme cerulean A theme, on a line of its own after the first: one of 43, such as plain, mono, cerulean, materia, cyborg, hacker

Sequence diagram

WriteWhat it does
participant Bob Declare a participant (also actor, database, queue)
Alice -> Bob : Hello Solid arrow with a message
Bob --> Alice : Hi back Dashed reply arrow
Alice ->> Bob : Async Thin arrowhead
Alice -> Alice : Think A message to itself
activate Bob
Bob --> Alice : Done
deactivate Bob
Show Bob as busy
alt Success
Alice -> Bob : Go on
else Failure
Alice -> Bob : Stop
end
Alternatives (also opt, loop, par)
note over Alice, Bob : … Note spanning participants
== Next phase == A divider
autonumber Number the messages

Class diagram

WriteWhat it does
class Order {
+id: int
-total: Money
+pay(): void
}
Fields and methods: + public, - private, # protected
interface Repository An interface (also abstract class, enum)
enum Status {
NEW
PAID
}
An enumeration
class Money <<value>> A stereotype
Entity <|-- Order Inheritance
Repository <|.. OrderRepository Implementation
Order *-- OrderLine Composition
Customer o-- Order Aggregation
Order --> Status Association
Customer "1" --> "*" Order : places Multiplicities and a label

Activity diagram

WriteWhat it does
start The start (stop for the end)
:Receive request; An action: text between : and ;
if (Approved?) then (yes)
:Ship it;
else (no)
:Revise;
endif
A decision
while (More items?) is (yes)
:Handle one;
endwhile (no)
A loop
fork
:Pack;
fork again
:Invoice;
end fork
In parallel
partition "Shipping" {
:Send;
}
A named part

Component diagram

WriteWhat it does
[Shop] A component
component "Order service" as Orders A component with a short name
package "Services" {
[Payments]
}
A group (also node, cloud, folder, frame)
database "Orders DB" as DB A database
interface API An interface
[Shop] --> [Orders] : REST An arrow with a label
[Shop] ..> API A dotted arrow
[Shop] - [Orders] A line, side by side

State diagram

WriteWhat it does
[*] --> Draft The start
Draft --> Review : submit A transition with its trigger
Review --> [*] The end
Draft : waiting for an author Text inside a state
state Review {
[*] --> Reading
Reading --> Signed
}
States inside a state
state Check <<choice>> A decision point

Use case diagram

WriteWhat it does
actor Customer An actor
usecase "Place order" as UC1 A use case with a short name
(Track order) A use case, written short
rectangle Shop {
(Refund order)
}
The system boundary
Customer --> (Place order) An actor uses it
(Place order) ..> (Pay) : <<include>> One includes another
left to right direction Lay the diagram out sideways

Gantt chart

WriteWhat it does
Project starts 2026-08-03 The first day
[Design] lasts 7 days A task and how long it takes
[Build] lasts 10 days
[Build] starts at [Design]'s end
One task after another
[Release] happens at [Design]'s end A milestone
[Design] lasts 7 days
[Design] is 50% completed
Progress
saturday are closed
sunday are closed
Days nobody works
-- Phase two -- A heading between tasks

Mind map

WriteWhat it does
* Release The center: one star
* Release
** Build
*** Design
A star more for each level
* Release
** Build
left side
** Launch
What follows goes to the left
* Release
**[#Orange] Risks
A color
* Release
**_ No box
A branch without a box

Deployment diagram

WriteWhat it does
node "Web server" as W A machine
database "Database" as D A database
cloud "Cloud" {
node "Worker"
}
A group (also folder, frame, package)
artifact "app.jar" Something deployed
node A
node B
A --> B : HTTPS
An arrow with a label
node A
node B
A .. B
A dotted line

C4 model diagram, with the C4 library

WriteWhat it does
!include <C4/C4_Container> Bring in C4, on a line after @startuml: C4_Context, C4_Container, C4_Component, C4_Dynamic, C4_Deployment or C4_Sequence
Person(admin, "Admin", "Runs the shop") A person: a name to refer to, a label, a description
System(shop, "Web shop", "Takes orders") A system
System_Ext(pay, "Payments") A system outside your own (also Person_Ext, Container_Ext)
Container(api, "API", "Node.js", "Orders and payments") A container, with its technology
ContainerDb(db, "Database", "PostgreSQL") A database (also ContainerQueue)
System_Boundary(b, "Web shop") {
Container(app, "App", "React")
}
A boundary around what belongs together
Rel(customer, web, "Uses", "HTTPS") An arrow from one to the other, with a label and a technology
Rel_R(customer, web, "Uses") An arrow that goes right (also Rel_L, Rel_U, Rel_D)
LAYOUT_LEFT_RIGHT() Lay the diagram out left to right
SHOW_LEGEND() A legend of the kinds used, on the last line

Object diagram

WriteWhat it does
object Order01 An object
object Order01 {
status = "PAID"
total = 240
}
With its values
map Settings {
theme => dark
size => 12
}
A table of keys and values
object A
object B
A *-- B
One holds the other (also --, o--, -->)

Entity relationship diagram

WriteWhat it does
entity Customer {
* id : int <<PK>>
--
name : text
}
An entity: a star marks what must be filled in, -- sets the key apart
Customer ||--o{ Order One to many
Customer ||--|| Account One to one
Order }o--o{ Product Many to many
Customer ||--o{ Order : places With a label

Entity relationship diagram in Chen's notation

WriteWhat it does
entity Customer {
Name
Number <<key>>
}
An entity and its attributes
relationship PLACES {
}
A relationship
entity Customer {
}
relationship PLACES {
}
PLACES -1- Customer
One
entity Order {
}
relationship PLACES {
}
PLACES -N- Order
Many

Timing diagram

WriteWhat it does
robust "Server" as S A line with named levels
concise "User" as U A line of states in a row
concise "User" as U
@0
U is Idle
A moment, and a state at it
concise "User" as U
@0
U is Idle
@100
U is Waiting
A later moment

Network diagram

WriteWhat it does
nwdiag {
network dmz {
web01;
}
}
A network and a machine on it
nwdiag {
network dmz {
address = "210.x.x.x/24"
web01 [address = "210.x.x.1"];
}
}
Addresses
nwdiag {
network dmz {
web01;
}
network internal {
web01;
db01;
}
}
A machine on two networks

Work breakdown structure

WriteWhat it does
* Release The top: one star
* Release
** Build
*** Design
A star more for each level
* Release
** Build
***< Testing
A box drawn to the left
* Release
**[#LightBlue] Launch
A color

JSON data

WriteWhat it does
{
"order": 1042,
"paid": true
}
Write the data as it is
#highlight "paid"
{
"order": 1042,
"paid": true
}
Mark one key

YAML data

WriteWhat it does
order: 1042
paid: true
Write the data as it is
lines:
- sku: A-1
- sku: B-7
A list

Wireframe (Salt)

WriteWhat it does
{
Name | "Ada Lovelace "
}
A grid in braces: | starts the next column, quotes make a text field
{
[Cancel] | [ Save ]
}
Buttons
{
() Monthly
(X) Yearly
}
Radio buttons
{
[] Remember me
[X] Send a copy
}
Checkboxes
{
^Norway^
}
A drop-down list

ArchiMate diagram

WriteWhat it does
archimate #Business "Customer" as customer <<business-actor>> A business element
archimate #Application "Order service" as orders <<application-component>> An application element
archimate #Technology "App server" as server <<technology-device>> A technology element
archimate #Business "A" as a <<business-actor>>
archimate #Application "B" as b <<application-component>>
a --> b
A relation

EBNF grammar

WriteWhat it does
sign = "+" | "-"; A rule: a name, =, what it is, and ;
number = digit, { digit };
digit = "0" | "1";
A comma joins, braces repeat
signed = [ "-" ], "1"; Square brackets: may be left out
bit = ( "0" | "1" ); Round brackets group

Regular expression

WriteWhat it does
[0-9]+ Write the expression itself, one to a diagram
(yes|no) Alternatives
ab?c An optional part

Themes

!theme cerulean, on a line of its own after the start line, draws the whole diagram in a theme. The app has 43, such as plain, mono, cerulean, materia, cyborg and hacker. A theme made for a dark background is put on a dark panel on a light page, and the other way round. Themes whose license does not allow it are not included.

On Auto, a themed diagram is put on the ground its theme is made for. Choose Light or Dark to pick the ground yourself. Two themes, black-knight and sketchy, read poorly on either ground in this version of PlantUML. A theme name the app does not have gets "There is no theme called … here".

Icons and emoji

<&heart> inside a label draws an Open Iconic icon, and <:smile:> an emoji. Both sets ship with the app. An emoji name the set does not have stops the whole diagram, so check the spelling if a diagram with an emoji will not draw.

What is not drawn

  • Graphviz graphs (@startdot), ditaa (@startditaa) and formulas (@startmath, @startlatex). The editor and the page say "This kind of diagram is not drawn here", with the kind.
  • A network diagram inside @startuml. It is drawn with @startnwdiag.
  • A formula inside a label (<math>, <latex>) is shown as its text.
  • Libraries other than C4, ArchiMate and Kubernetes, such as AWS, Azure and the icon sets. The editor says "This diagram asks for … which this app does not include", with the library's name.
  • Files, themes or pictures from a web address or a folder. The editor says "A diagram is drawn from its own text alone. This app fetches no file, theme or picture from an address or a folder."

Limits

  • The largest side of a drawing is 16,384 pixels. A larger diagram gets "This diagram is too large to draw", with its size.
  • Diagrams are laid out by PlantUML's built-in layout. Some PlantUML tools use Graphviz for class, component and use case diagrams, so the same text can be arranged a little differently there.
  • Alt text is up to 250 characters. The editor keeps up to five earlier versions of a diagram's text.
  • Readable (automatic) size shrinks a PlantUML diagram to three quarters of its size at most, so its text stays readable; a wider one scrolls sideways.

Which PlantUML

The app draws with PlantUML 1.2026.10, the @plantuml/core build of PlantUML for the browser, which ships inside the app. Diagrams are drawn in the reader's browser. PlantUML's own language guide has more options for each kind than the editor's reference lists; most of them work, within the limits above.