Vertical Line
Vertical Dashed Line
Horizontal Line
Line Color
Line Notes
Double dash, or use up or down keywords
@startuml
() " " as u1
() " " as u2
() " " as u3
() " " as u4
() " " as u5
() " " as u6
u1 -- u2
u3 -down- u4
u5 -up- u6
@enduml
Double dot or dashed keyword in square brackets
@startuml
() " " as u1
() " " as u2
() " " as u3
u1 .. u2
u2 -[dashed]- u3
@enduml
Single dash, or use left or right keywords
@startuml
() " " as u1
() " " as u2
() " " as u3
() " " as u4
() " " as u5
() " " as u6
u1 - u2
u3 -left- u4
u5 -right- u6
@enduml
Specify line color in square brackets in the line characters:
@startuml
skinparam interface {
BorderColor black
BackgroundColor white
}
() " " as u1
() " " as u2
u1 -[#blue] u2
u1 -[#green]-> u2
u1 <-[#mediumvioletred]-> u2
@enduml
To change line color for all lines, use skinparam ArrowColor:
@startuml
skinparam interface {
BorderColor black
BackgroundColor white
}
' Use this to set color on all lines:
skinparam ArrowColor blue
() " " as u1
() " " as u2
u1 - u2
u1 --> u2
u1 <--> u2
@enduml
Add note for line after a colon:
@startuml
skinparam interface {
BorderColor black
BackgroundColor white
}
() " " as u1
() " " as u2
() " " as u3
u1 -[#blue] u2 : Blue Line
u2 -[#green]-> u3 : Green Line
u3 <-[#red]-> u1 : Red Line
@enduml