17 / 18

TipsURL copied

  • Use layout: elk for denser, more complex graphs.
  • Use width: 85vw or 90vw for large architecture diagrams.
  • For animated compositions, prefer short labels and clear scenario deltas.
  • If a diagram is too dense, split it into multiple diagrams and link them with headings.
  • For icons, use D2's icon: "<svg-url>" support with SVG URLs.
  • Good sources:
    • D2 icon tour: https://github.com/terrastruct/d2-docs/blob/master/docs/tour/icons.md
    • Terrastruct icon catalog (official D2 examples): https://icons.terrastruct.com/
    • Iconify API (large icon library used in examples above): https://api.iconify.design/