Supported PlantUML libraries

Most of PlantUML's power beyond plain UML comes from its standard library: icon sets and macro packages pulled in with an !include line.

These are what make C4, cloud architecture and ArchiMate diagrams possible in PlantUML rather than only in a canvas editor.


#When you need this page

  • Drawing cloud architecture with official icons, in text.

  • Using C4 or ArchiMate without switching tools.

  • Finding out why an !include line fails.


#The detail

Field

What it does

<C4/C4_Context> and friends

C4 model macros: Person, System, Container, Component, Rel.

<awslib/AWSCommon>

AWS icon set, plus per-service includes.

<azure/AzureCommon>

Azure icon set.

<archimate/Archimate>

ArchiMate element macros across all layers.

<office/...>

Office and generic business icons.

<tupadr3/common>

Font Awesome and Devicons icon macros.

<material/...>

Material Design icons.


#A worked example

AWS icons pulled in from the standard library:

Supported PlantUML libraries

The source, which you can paste into a new diagram and edit:

@startuml
!include <awslib/AWSCommon>
!include <awslib/Compute/EC2>
!include <awslib/Database/RDS>
!include <awslib/NetworkingContentDelivery/ElasticLoadBalancing>

ElasticLoadBalancing(alb, "Load balancer", "")
EC2(app1, "App server 1", "")
EC2(app2, "App server 2", "")
RDS(db, "Orders database", "")

alb --> app1
alb --> app2
app1 --> db
app2 --> db
@enduml

#A few things that catch people out

  • The include path is case sensitive and the service paths are nested; a typo fails the whole diagram.

  • Include the Common file for a library before including individual icons from it.

  • Icon sets are large. Include only what you use, or rendering slows noticeably.



One include line, a whole icon set.