Mermaid Requirement Diagram Maker
Write requirement diagrams in Mermaid code and watch them render as you type. Start from the example below, then export PNG or SVG, share a link or embed the diagram.
Updated · Code editor with live preview
Requirement diagram example
Rendering preview…
requirementDiagram
requirement signup_req {
id: 1
text: Visitors can create an account with an email address.
risk: high
verifymethod: test
}
functionalRequirement email_req {
id: 1.1
text: The account email must be verified before first sign in.
risk: medium
verifymethod: test
}
element signup_form {
type: simulation
}
signup_req - derives -> email_req
signup_form - satisfies -> signup_reqWhat is a requirement diagram?
A requirement diagram records what a system must do and links each requirement to the things that satisfy, verify or derive from it. It follows the SysML requirement model, so it suits regulated and safety-critical work where traceability has to be demonstrable. In Mermaid you write one starting with the requirementDiagram keyword.
When to use a requirement diagram
- Traceability for regulated or safety-critical systems
- Linking acceptance tests back to requirements
- Systems engineering documentation
- Audit evidence that every requirement is verified
How to make a requirement diagram in Mermaid
- Step 1
Open the editor
Open TryMermaid with the example on this page, or start a new diagram with requirementDiagram on the first line.
- Step 2
Write the requirements
Declare each requirement in a block with an id, the text of the requirement, its risk and its verifymethod.
- Step 3
Trace the links
Declare the elements that implement or test them, then link the two with relationships such as satisfies or verifies.
- Step 4
Export or share
Check the live preview, then export as PNG or SVG or copy a share link.
Requirement diagram syntax cheat sheet
| Element | Syntax | What it does |
|---|---|---|
| Start | requirementDiagram | Begins a requirement diagram |
| Requirement | requirement signup_req { … } | A named requirement block |
| Id | id: 1.1 | Reference number inside a block |
| Text | text: Users can sign in. | What the requirement says |
| Risk | risk: high | low, medium or high |
| Verify method | verifymethod: test | analysis, inspection, test or demonstration |
| Element | element signup_form { … } | Something that implements or tests a requirement |
| Relationship | signup_form - satisfies -> signup_req | satisfies, verifies, derives, refines, traces, contains or copies |
Requirement diagram FAQ
What requirement types does Mermaid support?
Mermaid supports requirement, functionalRequirement, interfaceRequirement, performanceRequirement, physicalRequirement and designConstraint. They are drawn the same way; the keyword records what kind of requirement it is.
Which relationships can I draw between requirements?
The relationships are satisfies, verifies, derives, refines, traces, contains and copies. Write them between two names, as in signup_form - satisfies -> signup_req.
What does verifymethod mean?
verifymethod records how the requirement will be shown to be met, and accepts analysis, inspection, test or demonstration. It appears in the box so reviewers can see the plan.