Skip to main content

Basic Syntax

Diagram Syntax Structure

All Diagrams definitions begin with a declaration of the diagram type, followed by the definitions of the diagram and its contents.

For example, the DSL below specify a Component Diagram by the componentDiagram declaration.

componentDiagram
  [Pintora] --> [DiagramRegistry] : Get diagram by type

Comments

You can add line comment with %% prefixed, the content in that line will not be rendered.

sequenceDiagram
  %% here is line comment
  %% another line comment
  A-->B: Hi there!

Directives

@param and @config

You can override current diagram config with these directives.

See Config for more details.

erDiagram
  @param fontSize 18
  @config({
    "themeConfig": {
      "theme": "larkLight"
    },
    "er": {
      "edgeType": "ortho"
    }
  })
  CUSTOMER {
    int id PK
    int address FK
  }
  CUSTOMER ||--o{ ORDER : places
  ORDER ||--|{ LINE-ITEM : contains
  CUSTOMER }|..|{ DELIVERY-ADDRESS : uses