D2 Language Code Snippets is a collection of code snippets for the D2 language, that can be used in any text editor that supports the use of snippets.
- 🔨 Create various shapes, including rectangles, squares, parallelograms, cylinders, queues, packages, steps, callouts, stored data, persons, diamonds, ovals, circles, hexagons, and clouds.
- 🎨 Style your shapes and connections with properties such as opacity, stroke, fill, stroke-width, stroke-dash, border-radius, shadow, 3D, multiple, font-size, font-color, animated, bold, italic, and underline.
- 📐 Create diagrams with various arrowhead styles, including triangle, diamond, circle, cf-one, cf-one-required, cf-many, and cf-many-required.
- 💎 Additional filled variants for diamond and circle arrowheads.
- A text editor that supports the use of code snippets.
- Basic knowledge of the D2 language.
To use these code snippets, you will need to import them into your text editor's snippet library. The process for doing this will vary depending on the text editor you are using. Please consult your text editor's documentation for instructions on how to import code snippets.
Once you have imported the code snippets into your text editor, you can use them by typing the prefix of the snippet you want to use and then pressing the tab key. The snippet will be inserted into your code, and you can then fill in the placeholders with your own code.
I would like to thank the D2 language community for their innovative and extremely useful language. It has fully changed my workflow.
D2 Language Documentation D2 Github D2 Playground
D2 Language Code Snippets is open-source software licensed under the MIT License.