vizzy directive reference
Inside a vizzy fence that directly follows a diagram or table, reference node and edge
ids to annotate it — or use the id-less title / desc forms to label the card as a whole.
A vizzy fence whose first line starts with architecture is instead a
standalone architecture diagram.
| Directive | Effect |
|---|---|
title <text> | Title the whole card — no id. Useful for a table, which has no in-fence title line |
desc <text> | A subtitle under the card’s title — describes the whole diagram or table (no id) |
desc <id>: text | A one-line description under a node’s label or a group’s title |
note <id>: text | Attach a sticky note to a node |
payload <A>-><B>: text | Label what an edge carries |
style <id> fill:…,stroke:… | Override a node’s Mermaid style (layers on top) |
hint <id>: [Title](dest) | Attach a click-to-open info hint badge |
pos <id> x=320 y=40 | Pin a node’s position (its center) |
labelpos <A>-><B>: 0.3 | Position an edge’s label at a fraction along the edge |
side <id> left / right | Pin a mind-map top-level branch to a side of the root |
phase <label>: <A->B> [color:…] [desc:…] | A sequence swimlane band starting at message A->B |
frame <keyword> [condition] color:<token> | Tint a sequence combined fragment’s tab, border, and dividers |
layout TB / LR / BT / RL | Override flow direction |
- Which thing does a fence annotate? The block immediately above it — the nearest preceding diagram or Markdown table, blank lines and prose aside. It’s positional, so put the fence directly after its subject; one fence annotates one block.
titleand id-lessdesclabel the whole card, not a node.title <text>sets the card’s heading anddesc <text>(no<id>:) a subtitle beneath it. This is how you give a table a heading and caption, since a table has no in-fence title line of its own.descworks the same in anarchitecturefence (ids may be declared further down) and in an annotation fence after a Mermaid diagram. On a group/subgraph id it renders as a subtitle under the section’s title and the gray box grows to fit it; on a node id it renders as a small line under the label. Reach for it to title a whole section instead of pinning anoteto one member node inside it.- Edges are addressed compactly as
A->Binpayload,hint, andlabelpos. labelposstores a fraction (0= source end …1= target end), so the label keeps the same spot along the line when nodes move and the edge re-routes — rather than a fixed point that drifts off. Omit it and the label auto-places near the middle.side(mind map only) pins a top-level branch to theleftorrightof the root; unpinned branches auto-balance by leaf count around the pinned ones, then the tidy-tree re-layouts that subtree. You choose the sides — vizzy keeps each side neat.hintalso accepts a group/subgraph id — the badge sits beside the group’s title — and a timeline / journey / quadrant label. On a quadrant point the marker itself is the hover target, so no badge is drawn. Inline notes show an(i); file links show an open-arrow.styleuses Mermaid property syntax (fill:,stroke:,color:,stroke-width:,stroke-dasharray:) and merges on top of any styling from themermaidfence — so avizzyfence is how you tint nodes in non-flowchart diagrams. It also targets a timeline / journey / quadrant element by its label (e.g.style Campaign A fill:greencolours one quadrant marker).phaseandframeare sequence-diagram only.phasedraws a tinted swimlane band over a run of messages;framecolours a combined fragment (loop/alt/opt/…). Both take acolor:palette token or#hex.- Directives are best-effort: an id that doesn’t match, or a malformed line, is ignored rather than breaking the diagram.
Example
Section titled “Example”```mermaidflowchart LR web[Web] -->|POST /login| api[API] --> db[(Postgres)]```
```vizzydesc db: primary + read replicanote api: rate limited 5/minstyle api fill:#DBEAFE,stroke:#2563EB,stroke-width:3pxhint api: [Rate limit]("Token bucket, **5/min**.")hint api->db: [Schema](data.vizzy.md)layout LR```