Skip to content

StyleAttributes

Leon Mika edited this page Apr 11, 2022 · 6 revisions

Style attributes can be applied to components of the sequence diagram to adjust their appearance. They can either be placed on the component themselves, usually as key/value pairs surrounded by parenthesis, or they can be applied to all components using the styles keyword.

An example of style attributes in action:

// Style applied to all participants within the diagram
style participant (
    color="blue",
    footer="none"
)

// Style applied to a single participant
participant Red (color="red"): I am red

Participants

The following style attributes can be applied to participants:

  • color: Sets the border, text and life-line colour of the participant. Can be any valid SVG colour.
  • footer: What to display for the participant in the sequence diagram footer. Can be either:
    • "none": do not display the participant in the footer.
    • "normal": display the participant within the footer. This is the default.
  • header: What to display for the participant in the sequence diagram header. Can be either:
    • "none": do not display the participant in the header.
    • "normal": display the participant within the header. This is the default.
  • icon: The icon to use to represent the participant. When set, the icon will be displayed in the header with the participant name underneath it and the participant will not be displayed within the footer. Can be either:
    • "none": do not use an icon for this participant. This is the default.
    • "human": use a stick-figure person as the icon for this participant.
    • "cylinder": use a cylinder as the icon for this participant.
    • "cloud": use a cloud as the icon for this participant.
  • lifeline: What to display for the lifeline of the participant. Can be either:
    • "none": do not display the lifeline of the participant.
    • "dashed": display a dashed line as the lifeline of the participant. This is the default.
  • textcolor: Sets the text colour of the participant. Can be any valid SVG colour and defaults to the participant colour.

Blocks

The following style attributes can be applied to blocks:

  • fullwidth: Whether the block should take up the full width of the diagram. Can be either "true" or "false". Default is "false".
Clone this wiki locally