5 PlantUML Diagram Templates (Copy-Paste Ready)
Same as the intro post — AI-assisted sample. The templates themselves are ready to run; feel free to rewrite the prose.
1. Sequence diagram
1 | @startuml |
Tip: alias long participant names with as; -> is a solid arrow, --> is a dashed reply.
2. Class diagram
1 | @startuml |
Tip: - / + / # mean private / public / protected; --> is association, <|-- inheritance, *-- composition, o-- aggregation, ..> dependency.
3. Usecase diagram
1 | @startuml |
Tip: include means a mandatory sub-usecase, extend means an optional one.
4. State diagram
1 | @startuml |
Tip: use [*] for start/end states; add notes with note right of StateName : text.
5. Activity diagram
1 | @startuml |
Tip: if (...) then (...) else (...) endif is the branch construct; switch / while / repeat all exist.
How to preview these
- This site’s online editor (coming soon): paste and preview live on the right
- VSCode: install the PlantUML extension, press Alt+D to preview
- CLI:
plantuml -tpng diagram.pumlproduces a PNG
Need more templates (ER, component, mind map)? Leave a comment.
- Title: 5 PlantUML Diagram Templates (Copy-Paste Ready)
- Author: puml.online
- Created at : 2026-07-15 16:35:00
- Updated at : 2026-08-14 21:34:29
- Link: https://puml.online/blog/plantuml-templates-en/
- License: This work is licensed under CC BY-NC-SA 4.0.