[Style] Allow to style background of state header/title
Author: The-LumCreated May 3, 2026Updated Aug 23, 2026
Labelsdocumentationenhancementstyleongoingfor-claude
Context
To follow:
- #2679
- And discussion on
title:trollface:
Wanted feature
- Could you allow to style background of state header/title?
Example
@startuml
<style>
stateDiagram {
element {
BackGroundColor orange
title {
Fontcolor red
FontStyle plain
BackGroundColor pink
}
}
header {
BackGroundColor aliceblue
Fontcolor blue
FontSize 12
}
stateBody {
BackGroundColor palegreen
}
}
</style>
hide empty description
state s0
state "Title ('element > title' style)" as s1 {
s1: State description (header style!)
state "s2 (title style)" as s2
state s3: long descr. (header style!)
state "s4 (title style)" as s4
s4: long descr. (header style!)
}
s0 --> s2
s2 -> s3
s3 -> s4
@enduml
Questions
- How to colour background of state title?
- How to colour background of state header?
- And it seems that
headeris not a good name in this context! Perhaps changetitletoheaderandheaderto?(no idea!)
Other references
Regards, Th.
Source: plantuml/plantuml