Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a hidden link to influence PlantUML’s automatic layout without adding a visible connector to the rendered diagram. In class-diagram syntax, write a relation with [hidden], such as A -[hidden]-> B. Keep these links focused on placement; use ordinary visible relations for the connections that convey meaning.

What a hidden link does

A hidden link is an invisible edge that still participates in layout calculations. It can nudge elements into a preferred relative arrangement while leaving the rendered diagram free of that extra line. It is a layout constraint, not a semantic relationship, so readers should not have to infer meaning from it.

The PlantUML Language Reference Guide, version 1.2025.0, documents hidden links as a way to force layout: PlantUML Language Reference Guide.

Write the hidden-link syntax

Put [hidden] inside the relation’s connector. The bracketed form can be used with a directional arrow or line:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • A -[hidden]-> B
  • A -[hidden]- B

Directional forms can also combine a direction marker with the hidden modifier, as in A -right[hidden]- B or A -down[hidden]- B. The exact arrangement produced depends on the diagram and layout context.

Use hidden edges to guide a diagram

This class-diagram example uses hidden links to encourage a left-to-right arrangement, while visible arrows show the calls readers should understand:

Rank #2
Beginning Fiddle: Compact Reference Library
  • Pages: 38
  • Instrumentation: Fiddle
  • Instrumentation: Violin
@startuml
class Client
class Service
class Database

' Layout hints: encourage a left-to-right sequence
Client -[hidden]right-> Service
Service -[hidden]right-> Database

' Visible relationships: the diagram's semantic story
Client --> Service : visible call
Service --> Database : visible query
@enduml

The hidden edges express placement intent; the visible edges express the modeled interactions. Comments make that distinction easier for someone who later edits the source. Avoid adding hidden links that imply a relationship the model does not have.

When to use other layout controls

Hidden links are useful when you need to exert directional pressure between elements. They are not the only layout control: the reference guide documents together for grouping elements, and official examples also show [norank] as an additional constraint. These mechanisms address different layout needs, so choose the least complicated one that communicates your intent in the source.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use a hidden link when an invisible edge between elements should guide their relative placement.
  • Use together when the goal is to group elements.
  • Consider [norank] when an additional constraint is needed beyond the hidden link.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check the rendered result

PlantUML’s exact layout can vary with its release, diagram type, and layout engine. Render the final source with the same PlantUML version and pipeline used for your documentation, then adjust the layout hints if the output does not match the intended arrangement. The official reference does not publish adoption, performance, or success-rate figures for hidden links.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.