Add a Borderless Text Box for Diagram Description

0 votes
asked Jun 12, 2025 in Wanted features by Omar Medina (160 points)

Hello PlantUML Team,

I would like to request a feature that allows adding a standalone text box at the top of a diagram to serve as a description or summary. The key requirements for this feature would be:

  • The text should appear as a separate block, positioned freely (preferably at the top).
  • It should not have a visible border, making it look like a natural part of the diagram rather than a framed note.
  • It should not interfere with the layout of participants or other elements.
  • Existing options like note and title do not fully meet this need—note does not allow proper placement, and title is too restrictive in formatting.

Would it be possible to introduce a new syntax or an enhancement to existing elements to support this functionality? I believe this would be a valuable addition for users who need to annotate diagrams with a clean, unobtrusive description.

Thank you for considering this request!

Best regards,
Omar

1 Answer

0 votes
answered Jun 12, 2025 by plantuml (298,400 points)
What about using header, footer or caption ?

See https://plantuml.com/commons
commented Jun 13, 2025 by Omar Medina
Thank.
i wanted to put an example:

@startuml

<style>
header {
HorizontalAlignment left
FontSize 26
FontColor black
Margin 30
}
</style>

left header
   This sequence diagram illustrates the event-driven interaction between the Tree Control and Notebook
   following a tree item activation. It highlights the use of `wxQueueEvent` to asynchronously
   dispatch events, ensuring structured communication between components.
   
   The process consists of:
   - Detecting a tree item double-click (`OnItemActivated()`).
   - Applying a locking mechanism to prevent redundant execution.
   - Retrieving associated tree item data (`GetItemData()`).
   - Validating the presence of the item data (`dPtr != nullptr`).
   - If the notebook page does not exist:
       - A new `AuiNotebookSplitter` instance is allocated.
       - The new page is added to the Notebook.
endheader

actor Actor
participant wxApp
participant "TreeCtrl_ElmFiles" as TreeCtrl
participant "AuiNotebook" as Notebook
participant "AuiNotebookSplitter" as NotebookSplitter
participant "JsonParserThread" as JsonThread

@enduml
commented Jun 16, 2025 by Omar Medina (160 points)
Hello everyone,
The example above demonstrates a simple way to add a diagram description consisting of multiple lines, aligned to the left.
In comparison, the example in the PlantUML documentation appears right-aligned, which doesn’t render well—particularly when the description includes a list or structured content.

Best regards,
Omar
...