Block diagrams: block-beta columns
简介 / Introduction
Block diagrams describe the structural composition of a system, ideal for showing hardware/software layers or data flow. Both PlantUML and Mermaid support block diagrams, though their syntax differs significantly. This article demonstrates equivalent diagrams using the same scenario on both engines.
PlantUML 版
PlantUML’s block syntax uses block <name> to define blocks and rel to connect them, supporting nested block structures.
1 | @startuml |
Mermaid 版
Mermaid v11’s block-beta uses block to declare blocks and arrange to control column layout (default LR), with : marking relationships.
1 | block-beta |
对比 / Side-by-side
| Feature | PlantUML | Mermaid |
|---|---|---|
| Declare block | block <name> as <alias> |
block <id>["label"] |
| Column layout | Implicit via nesting | columns N explicitly sets count |
| Connection | rel + direction symbols |
=> or <= |
| Nested blocks | block ... end block |
Direct nesting not supported |
| Styling | skinparam + color keywords |
No color injection yet |
小结 / Wrap-up
PlantUML blocks suit complex nested structures with fine-grained style control via skinparams; Mermaid block-beta wins on brevity with arrange-based column auto-layout. Both are valid choices for system architecture diagrams — pick based on your toolchain and diagram complexity.
- Title: Block diagrams: block-beta columns
- Author: puml.online
- Created at : 2026-10-05 09:00:00
- Updated at : 2026-10-05 01:06:39
- Link: https://puml.online/blog/block-beta-columns-en/
- License: This work is licensed under CC BY-NC-SA 4.0.