Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Elements of component diagrams

One page per symbol of a component diagram: what it looks like, its syntax and the UML 2.5.1 clause it follows. Use these pages to look something up; to write a whole diagram, start with Component diagrams.

ElementSyntax
Componentcomponent "Name" as a <<stereotype>> { ... }
Interfaceprovides I, requires I
Portport p left provides I
Connectora --> b : label
Packagepackage "Name" { ... } around components
Notenote a: text
diagram component "All the component elements"

component Client { requires IApi }

package "Backend" {
  component Service {
    port api provides IApi
    component Worker
    api --> Worker
  }
  component Database <<database>>
  Service ..> Database : queries
}
note Client: Retries on timeout.
All the component elements Client Backend Service Worker «database» Database Retries on timeout. IApi api queries

See Component diagrams for how to write one, and the grammar for every statement.