← Back to library
Viewport capture · opening screen Assembled in your browser. No API key or AI request needed. Changing the fields refreshes the preview.
D2 — Diagram playground
Developer ToolsSee it liveplay.d2lang.com
A short diagram definition appears beside its rendered boxes and connector, with compile and export controls above.

Why this pattern works
Put rendering settings above a side-by-side source and diagram workspace.
Design notes
- Surface
- D2 — Diagram playground
- Navigation
- A small top bar links documentation, icons, and the command-line tool.
- Layout
- A source pane and output pane share the width under a settings toolbar.
- Density
- Low initial density makes the code-to-diagram relationship easy to see.
- Color
- White, pale blue, dark text, and blue connector outlines.
- Type
- Small sans-serif labels keep tools and content visually separate.
- Pattern
- Put rendering settings above a side-by-side source and diagram workspace.
- States
- This capture records the visible state only. Loading, error, and later workflow states were not verified.
- Don't
- Adapt the interface pattern with original content, branding, and data; do not infer behavior from a still image.
Make it your own
Turn this reference into a useful brief for your project. Copy it into the AI tool you already use.