Skip to content

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.

DirectiveEffect
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>: textA one-line description under a node’s label or a group’s title
note <id>: textAttach a sticky note to a node
payload <A>-><B>: textLabel 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=40Pin a node’s position (its center)
labelpos <A>-><B>: 0.3Position an edge’s label at a fraction along the edge
side <id> left / rightPin 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 / RLOverride 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.
  • title and id-less desc label the whole card, not a node. title <text> sets the card’s heading and desc <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.
  • desc works the same in an architecture fence (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 a note to one member node inside it.
  • Edges are addressed compactly as A->B in payload, hint, and labelpos.
  • labelpos stores 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 the left or right of 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.
  • hint also 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.
  • style uses Mermaid property syntax (fill:, stroke:, color:, stroke-width:, stroke-dasharray:) and merges on top of any styling from the mermaid fence — so a vizzy fence 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:green colours one quadrant marker).
  • phase and frame are sequence-diagram only. phase draws a tinted swimlane band over a run of messages; frame colours a combined fragment (loop/alt/opt/…). Both take a color: 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.
```mermaid
flowchart LR
web[Web] -->|POST /login| api[API] --> db[(Postgres)]
```
```vizzy
desc db: primary + read replica
note api: rate limited 5/min
style api fill:#DBEAFE,stroke:#2563EB,stroke-width:3px
hint api: [Rate limit]("Token bucket, **5/min**.")
hint api->db: [Schema](data.vizzy.md)
layout LR
```