MermaidDirectionMermaid diagram direction types for controlling layout orientation.
Details
Determines the flow direction of nodes and edges in the diagram:
TB/TD: Top to Bottom (vertical layout, default)BT: Bottom to Top (reverse vertical)LR: Left to Right (horizontal layout)RL: Right to Left (reverse horizontal)
Example (Configuring Mermaid directions)
import type { Graph } from "effect"
// Horizontal workflow diagram
const horizontalOptions: Graph.MermaidOptions<string, string> = {
direction: "LR"
}
// Vertical hierarchy (default)
const verticalOptions: Graph.MermaidOptions<string, string> = {
direction: "TB"
}
// Bottom-up flow
const bottomUpOptions: Graph.MermaidOptions<string, string> = {
direction: "BT"
}models
Source effect/Graph.ts:21806 lines
export type type MermaidDirection =
| "TB"
| "TD"
| "BT"
| "RL"
| "LR"
Mermaid diagram direction types for controlling layout orientation.
Details
Determines the flow direction of nodes and edges in the diagram:
TB/TD: Top to Bottom (vertical layout, default)
BT: Bottom to Top (reverse vertical)
LR: Left to Right (horizontal layout)
RL: Right to Left (reverse horizontal)
Example (Configuring Mermaid directions)
import type { Graph } from "effect"
// Horizontal workflow diagram
const horizontalOptions: Graph.MermaidOptions<string, string> = {
direction: "LR"
}
// Vertical hierarchy (default)
const verticalOptions: Graph.MermaidOptions<string, string> = {
direction: "TB"
}
// Bottom-up flow
const bottomUpOptions: Graph.MermaidOptions<string, string> = {
direction: "BT"
}
MermaidDirection =
| "TB" // Top to Bottom (default)
| "TD" // Top Down (same as TB)
| "BT" // Bottom to Top
| "RL" // Right to Left
| "LR" // Left to RightReferenced by 1 symbols