File basics
A file may begin with a kind and a title, and may set a direction.
diagram component "Title"
direction right
The kinds implemented are component, package, sequence, state and activity. A file with no header is a
component diagram. The default direction is right for component diagrams and
down for package and state diagrams. See Package diagrams and
State diagrams. direction does not apply to sequence and activity diagrams, which always run top to bottom.
Direction
direction right places dependencies left to right. It suits most component
diagrams, because labels read naturally on horizontal lines.
diagram component "direction right"
direction right
component A
component B
component C
A --> B
B --> C
direction down places dependencies top to bottom. It suits pipelines and layers.
diagram component "direction down"
direction down
component A
component B
component C
A --> B
B --> C
Comments
# and // start a comment that runs to the end of the line.