All diagram types Open editor

merIDK / Diagram types / Requirement diagram

Mermaid requirement diagram: example and syntax

Requirement diagrams follow SysML. They link requirements to the parts of a system that satisfy or verify them, which helps with traceability in regulated or safety-critical projects.

Open this example in the editor

Example code

requirementDiagram
    requirement login_req {
        id: 1
        text: Users can sign in
        risk: high
        verifymethod: test
    }
    element login_page {
        type: page
    }
    login_page - satisfies -> login_req

Result

requirementDiagram
    requirement login_req {
        id: 1
        text: Users can sign in
        risk: high
        verifymethod: test
    }
    element login_page {
        type: page
    }
    login_page - satisfies -> login_req

Syntax quick reference

How to use it

  1. Open the example in the editor, or paste your own Mermaid code.
  2. Edit the code on the left. The preview updates as you type, and errors point to the line.
  3. Export SVG or PNG, copy a Markdown block for GitHub or Notion, or copy a share link.

More diagram types