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

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.