scientific-skills/markdown-mermaid-writing/references/diagrams/zenuml.md
Back to Style Guide — Read the style guide first for emoji, color, and accessibility rules.
Syntax keyword: zenuml
Best for: Code-like sequence diagrams, method-call-style interactions, developers familiar with programming syntax
When NOT to use: Prefer standard Sequence Diagrams for most use cases — ZenUML requires an external plugin and has limited GitHub support.
⚠️ GitHub support: ZenUML requires the
@mermaid-js/mermaid-zenumlexternal module. It may not render on GitHub natively. Use standardsequenceDiagramsyntax for GitHub compatibility.⚠️ Accessibility: ZenUML does not support
accTitle/accDescr. Always place a descriptive italic Markdown paragraph directly above the code block.
ZenUML sequence diagram showing a user authentication flow with credential validation and token generation using programming-style syntax:
zenuml
@Actor User
@Boundary AuthAPI
@Entity Database
// User initiates login
User->AuthAPI.login(credentials) {
AuthAPI->Database.findUser(email) {
return user
}
if (user.valid) {
return token
} else {
return error
}
}
A->B.method(args){} create natural nesting (activation bars)if/else, while, for, try/catch/finally, par@Actor, @Boundary, @Entity, @Database, @Control// render above messagesreturn keyword draws return arrowssequenceDiagram for GitHub compatibilityDescription of the interaction flow:
zenuml
@Actor User
@Boundary Server
@Entity DB
User->Server.request(data) {
Server->DB.query(params) {
return results
}
return response
}