{"id":2020,"date":"2026-08-06T06:15:46","date_gmt":"2026-08-06T06:15:46","guid":{"rendered":"https:\/\/www.vpascode.com\/pl\/docs\/uncategorized\/d2-syntax-basics\/"},"modified":"2026-08-06T06:15:46","modified_gmt":"2026-08-06T06:15:46","slug":"d2-syntax-basics","status":"publish","type":"ld_docs","link":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/","title":{"rendered":"Podstawy sk\u0142adni D2"},"content":{"rendered":"<p>D2 to nowoczesne narz\u0119dzie oparte na tek\u015bcie do tworzenia jasnych, czytelnych schemat\u00f3w. Oznacza to \u201eDeklaratywne rysowanie schemat\u00f3w\u201d. W VPasCode D2 pozwala programistom i architektom rozwi\u0105za\u0144 przekszta\u0142ca\u0107 prosty kod tekstowy w czyste modele wizualne, nie musz\u0105c r\u0119cznie rysowa\u0107 kszta\u0142t\u00f3w.<\/p>\n<div class=\"callout\" style=\"background-color: #f0fdf4; border-left: 4px solid #16a34a; padding: 1rem; border-radius: 4px; margin-bottom: 1.5rem;\"><strong>Wskaz\u00f3wka:<\/strong>Sk\u0142adnia D2 zosta\u0142a zaprojektowana w taki spos\u00f3b, aby by\u0142a prosta i \u0142atwa do odczytania. Kszta\u0142ty, po\u0142\u0105czenia, etykiety i grupy mo\u017cna wszystkie zapisa\u0107 przy u\u017cyciu prostych linii tekstu bez skomplikowanych konfiguracji.<\/div>\n<h2 style=\"font-size: 1.5rem; font-weight: bold; color: #1f2937; margin-top: 2rem; margin-bottom: 1rem; border-left: 4px solid #4f46e5; padding-left: 0.75rem;\">1. Podstawowe kszta\u0142ty i po\u0142\u0105czenia<\/h2>\n<p>Aby stworzy\u0107 kszta\u0142ty, po prostu wpisz ich nazwy. Aby po\u0142\u0105czy\u0107 kszta\u0142ty, u\u017cyj strza\u0142ki (<code>-&gt;<\/code> dla jednokierunkowego lub <code>&lt;-&gt;<\/code> dla dwukierunkowego).<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">D2<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpdjLEKwkAQRPuD+4cFa7EPYhMRS8lFUm\/OgRzEje7tCf69iSCi1TAzj7eikK63EVRPIoiWJvHunKG03lGHngL0Aa3o2LYnanAvyObd91m4PRv3nFHRARaHd\/fus\/6bGlhRmSOX0fKPazujNccBC8WXTafJQOEp8QX5ZzbN\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">D2<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpljbEKwjAURfdC\/+GBs7gXcdDFMdCWgNszfZBYSEKaEpJRED\/I1c32v0wnFcfLOZy7AubM4Amsma\/TTSTSisqinZ\/R9yZo1cN6BzW5QA445xWc0EaP2YJj07Cy+LDF3GNC6FBHIStg5qzIpWXn5hf6awb3ekx3CDEfqp\/mNqsHFJIqqKMW0hmtEooLgulEin7cJLRqGN85D0ds\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-d2\"><code class=\"language-d2\" data-language=\"d2\" class=\"language-d2\"># Proste po\u0142\u0105czenie\r\nU\u017cytkownik -&gt; Serwer WWW: Zapytanie HTTP\r\nSerwer WWW -&gt; Baza danych: Pobierz dane\r\nBaza danych -&gt; Serwer WWW: Zwr\u00f3\u0107 wyniki\r\nSerwer WWW &lt;-&gt; Cache: Synchronizacja odczytu\/zapisu<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpljbEKwjAURfdC\/+GBs7gXcdDFMdCWgNszfZBYSEKaEpJRED\/I1c32v0wnFcfLOZy7AubM4Amsma\/TTSTSisqinZ\/R9yZo1cN6BzW5QA445xWc0EaP2YJj07Cy+LDF3GNC6FBHIStg5qzIpWXn5hf6awb3ekx3CDEfqp\/mNqsHFJIqqKMW0hmtEooLgulEin7cJLRqGN85D0ds\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpdjLEKwkAQRPuD+4cFa7EPYhMRS8lFUm\/OgRzEje7tCf69iSCi1TAzj7eikK63EVRPIoiWJvHunKG03lGHngL0Aa3o2LYnanAvyObd91m4PRv3nFHRARaHd\/fus\/6bGlhRmSOX0fKPazujNccBC8WXTafJQOEp8QX5ZzbN\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"fTwbVMr\"><img fetchpriority=\"high\" alt=\"D2 simple connection diagram showing request and response flows between User, Web Server, Database, and Cache - Text to diagram editor - VPasCode\" class=\"alignnone wp-image-1923 size-full\" decoding=\"async\" fetchpriority=\"high\" height=\"642\" sizes=\"(max-width: 535px) 100vw, 535px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d37a7527.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d37a7527.png 535w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d37a7527-250x300.png 250w\" width=\"535\"\/><\/p>\n<h2 style=\"font-size: 1.5rem; font-weight: bold; color: #1f2937; margin-top: 2rem; margin-bottom: 1rem; border-left: 4px solid #4f46e5; padding-left: 0.75rem;\">2. Typy kszta\u0142t\u00f3w i niestandardowe etykiety<\/h2>\n<p>Domy\u015blnie kszta\u0142ty pojawiaj\u0105 si\u0119 jako standardowe prostok\u0105ty. Mo\u017cesz \u0142atwo zmieni\u0107 typ ikony kszta\u0142tu lub ustawi\u0107 niestandardow\u0105 etykiet\u0119, u\u017cywaj\u0105c w\u0142a\u015bciwo\u015bci <code>shape<\/code> w\u0142a\u015bciwo\u015bci.<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">D2<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpdjkEKwjAQRfeB3OFTN7rwAlm40CwVWuIFpu1YB2JakigU8e4SKELdvv\/g\/Q0s3yRIGODuNDGu88RJq5MXDtngrRWQymIwcUxj0OqjVRHGZw\/H8SUdp7XYlW3xLiQB9vgnzF5Cz7EgTy17g6qO8qA4w1KmlhJjW48pD5Fdc95Vv2q5hf0B634hS+kLMeE\/Sw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">D2<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpTVnBJTcvMy8wvT8zLTFUoqSw4vLlcIbu4qiTxaFMJkM3L5Z2TmZpXYqVQzculoFCckViQaqWQX5yflMjLVcvLxcsVWny0qTQ9UyE5I7e0KL88FVUlWBSm1P1oE9DIvESFpMSqRIWUxLzK5Aw05ZU5mXkpRZXJVXmVIOGcxKTUHCsFJWw6FTQC8otL0otSgwN9NJWgVkBcq6Brp4DuLpAYNmMA71VaVA==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-d2\"><code class=\"language-d2\" data-language=\"d2\" class=\"language-d2\"># Definiowanie typ\u00f3w kszta\u0142t\u00f3w\r\nKlient: {\r\n  shape: osoba\r\n}\r\n\r\nUs\u0142ugi chmurowe: {\r\n  shape: chmura\r\n}\r\n\r\nG\u0142\u00f3wna baza danych: {\r\n  shape: cylindryczny\r\n  label: \"G\u0142\u00f3wna baza danych (PostgreSQL)\"\r\n}\r\n\r\nKlient -&gt; Us\u0142ugi chmurowe -&gt; G\u0142\u00f3wna baza danych<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpTVnBJTcvMy8wvT8zLTFUoqSw4vLlcIbu4qiTxaFMJkM3L5Z2TmZpXYqVQzculoFCckViQaqWQX5yflMjLVcvLxcsVWny0qTQ9UyE5I7e0KL88FVUlWBSm1P1oE9DIvESFpMSqRIWUxLzK5Aw05ZU5mXkpRZXJVXmVIOGcxKTUHCsFJWw6FTQC8otL0otSgwN9NJWgVkBcq6Brp4DuLpAYNmMA71VaVA==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpdjkEKwjAQRfeB3OFTN7rwAlm40CwVWuIFpu1YB2JakigU8e4SKELdvv\/g\/Q0s3yRIGODuNDGu88RJq5MXDtngrRWQymIwcUxj0OqjVRHGZw\/H8SUdp7XYlW3xLiQB9vgnzF5Cz7EgTy17g6qO8qA4w1KmlhJjW48pD5Fdc95Vv2q5hf0B634hS+kLMeE\/Sw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"GQAkWLQ\"><img alt=\"D2 custom shapes showing person, cloud, and database cylinder icons linked in sequence - Text to diagram editor - VPasCode\" class=\"alignnone wp-image-1924 size-full\" decoding=\"async\" height=\"670\" sizes=\"(max-width: 470px) 100vw, 470px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d444e3dd.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d444e3dd.png 470w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d444e3dd-210x300.png 210w\" width=\"470\"\/><\/p>\n<h2 style=\"font-size: 1.5rem; font-weight: bold; color: #1f2937; margin-top: 2rem; margin-bottom: 1rem; border-left: 4px solid #4f46e5; padding-left: 0.75rem;\">3. Definicje klas<\/h2>\n<p>D2 domy\u015blnie obs\u0142uguje projektowanie struktur opartych na obiektach przy u\u017cyciu kszta\u0142tu <code>class<\/code> kszta\u0142t.<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">D2<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpFyTsKgDAMANC90Dtk1Ctkq07OniC0QQP9SFNdxLtLcXB9bz61lcTVeV\/O3BBuawB0p4MRfCRVa7rQ90tAWFuVvHXkRBJdCJVVf+8j6nyTi4cRYSolMmVrnheKDyJB\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">D2<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpFyTEOgzAMAMA9Uv7gEb6QLd0QY19gJRZYTW0UuyyIv1eZWO9WFde1MYljgisGANvxoASfhoYxDMFS9Ce+1ARv7yzbQPoit1xrJ7PHx7Dl4nzSNCd4qTZCieH+A\/v2IOs=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-d2\"><code class=\"language-d2\" data-language=\"d2\" class=\"language-d2\">KontoKlienta: {\r\n  shape: klasa\r\n\r\n  accountId: String\r\n  emailAddress: String\r\n\r\n  isActive(): Boolean\r\n}<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpFyTEOgzAMAMA9Uv7gEb6QLd0QY19gJRZYTW0UuyyIv1eZWO9WFde1MYljgisGANvxoASfhoYxDMFS9Ce+1ARv7yzbQPoit1xrJ7PHx7Dl4nzSNCd4qTZCieH+A\/v2IOs=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNpFyTsKgDAMANC90Dtk1Ctkq07OniC0QQP9SFNdxLtLcXB9bz61lcTVeV\/O3BBuawB0p4MRfCRVa7rQ90tAWFuVvHXkRBJdCJVVf+8j6nyTi4cRYSolMmVrnheKDyJB\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"xQUTaiD\"><img alt=\"D2 class diagram displaying CustomerAccount properties and isActive method - Text to diagram editor - VPasCode\" class=\"alignnone wp-image-1925 size-full\" decoding=\"async\" height=\"432\" sizes=\"(max-width: 522px) 100vw, 522px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d4d8bc24.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d4d8bc24.png 522w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d4d8bc24-300x248.png 300w\" width=\"522\"\/><\/p>\n<h2 style=\"font-size: 1.5rem; font-weight: bold; color: #1f2937; margin-top: 2rem; margin-bottom: 1rem; border-left: 4px solid #4f46e5; padding-left: 0.75rem;\">4. Zagnie\u017cd\u017cone kontenery (grupowanie)<\/h2>\n<p>D2 u\u0142atwia grupowanie element\u00f3w wewn\u0105trz kontener\u00f3w przy u\u017cyciu standardowych nawias\u00f3w klamrowych (&#8220;<code>{}<\/code>). Mo\u017cesz r\u00f3wnie\u017c \u0142\u0105czy\u0107 elementy mi\u0119dzy r\u00f3\u017cnymi grupami przy u\u017cyciu notacji kropkowej.<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">D2<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNptj8EKgkAQhu8L+w4DnvUBOgQmJR6k0HqAYZ1sSWZlXJOI3j03OlR4nOH\/5v8mglzc2FtuYbL+Apljj5ZJBq12Mg\/EDaR931mD3jpewUMrgIrQeDgVEK+h9ugJSmRsSbR6aqXVBs01kAWfBQcvo\/Gj0AdODwXkMzPhPfDpOPeW1ogbSG7W0EJmLw3JX+hdFEE2r4a4DV+AccxkgueyffLjGg4viyZf9SuotvURMuy6FxZ4Y5w=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">D2<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNp9kMFKAzEQhu+BvMNAz\/YBehAqiOxBKFXxPGZnJU2TLJOEsBEvYh\/C5\/Dqzd33Ml1EUKjHGeb\/\/++fBVxx6n1GpwkKQu+tV+MBjHeRHPHne5Zi3e+1QbVD6Hjet1WwgicpAJo6c0e7AHcNbAlVhLNzuK7advoghhDRJSmepZCicR1jiJxMTIzwgMr88rpgtAjrTTNbaMM+EGcdIGVNXIZIe6crKf57XNBWak3T63fsAjZ+ehkPqtCxpdXjW1sGeKzF0eoT9ZZ\/KhxTTvIvf2BWcD\/kmjb\/c3t5c\/sFKet\/Xg==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-d2\"><code class=\"language-d2\" data-language=\"d2\" class=\"language-d2\"># Grupowanie za pomoc\u0105 kontener\u00f3w\r\nAplikacja frontendowa: {\r\n  Interfejs UI React -&gt; Mened\u017cer stanu\r\n}\r\n\r\nInfrastruktura backendowa: {\r\n  Brama API -&gt; Mikroserwis uwierzytelniania\r\n  Brama API -&gt; Mikroserwis zam\u00f3wie\u0144\r\n}\r\n\r\n# Po\u0142\u0105czenie mi\u0119dzy grupami\r\nAplikacja frontendowa.Mened\u017cer stanu -&gt; Infrastruktura backendowa.Brama API: Wywo\u0142anie REST<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNp9kMFKAzEQhu+BvMNAz\/YBehAqiOxBKFXxPGZnJU2TLJOEsBEvYh\/C5\/Dqzd33Ml1EUKjHGeb\/\/++fBVxx6n1GpwkKQu+tV+MBjHeRHPHne5Zi3e+1QbVD6Hjet1WwgicpAJo6c0e7AHcNbAlVhLNzuK7advoghhDRJSmepZCicR1jiJxMTIzwgMr88rpgtAjrTTNbaMM+EGcdIGVNXIZIe6crKf57XNBWak3T63fsAjZ+ehkPqtCxpdXjW1sGeKzF0eoT9ZZ\/KhxTTvIvf2BWcD\/kmjb\/c3t5c\/sFKet\/Xg==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNptj8EKgkAQhu8L+w4DnvUBOgQmJR6k0HqAYZ1sSWZlXJOI3j03OlR4nOH\/5v8mglzc2FtuYbL+Apljj5ZJBq12Mg\/EDaR931mD3jpewUMrgIrQeDgVEK+h9ugJSmRsSbR6aqXVBs01kAWfBQcvo\/Gj0AdODwXkMzPhPfDpOPeW1ogbSG7W0EJmLw3JX+hdFEE2r4a4DV+AccxkgueyffLjGg4viyZf9SuotvURMuy6FxZ4Y5w=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"XvKRcme\"><img loading=\"lazy\" alt=\"D2 nested containers grouping Frontend Application and Backend Infrastructure modules - Text to diagram editor - VPasCode\" class=\"alignnone wp-image-1926 size-full\" decoding=\"async\" height=\"987\" loading=\"lazy\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d5828bfa.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d5828bfa.png 674w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d5828bfa-205x300.png 205w\" width=\"674\"\/><\/p>\n<h2 style=\"font-size: 1.5rem; font-weight: bold; color: #1f2937; margin-top: 2rem; margin-bottom: 1rem; border-left: 4px solid #4f46e5; padding-left: 0.75rem;\">5. Stylizacja i kolory<\/h2>\n<p>Niestandardowe kolory t\u0142a, kolory obramowania i style czcionek mo\u017cna dostosowa\u0107 bezpo\u015brednio w bloku przy u\u017cyciu s\u0142owa kluczowego<code>style<\/code>s\u0142owa kluczowego.<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">D2<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNoLTi0qy0xOVXC0Uqjm5VJQKC6pzEmFshUU0jJzcqwUlJRTDVLN09KUIILFJUX52akgYRNjY4vkRKhwUn5RSmqRblFiSmZpsZWCBUi0lpcLiHi5gqG2OOG1JS01zTjZHMOWFEtzcwMzJWzmOSro2ikgGR6cmpei4JtaXJyYngoAKgc5Cw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">D2<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNoLLT7aVJqeqOBopVDNy6WgUFxSmZMKZSsolFcWpB5tystMBSIrBSXlVINU87Q0JYhkflJRYm5+eSJUzsTY2CI5ESpXUJSfm5l6tCU+L7Eo\/+ievMzsRCsFC5BcLS8XEPFyhUItdiLK4rTUNONkc+wWp1iamxuYKWEz3FFB104ByabwyqOzczKzFMozE1Pyc\/OPzj7SDgDw4085\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-d2\"><code class=\"language-d2\" data-language=\"d2\" class=\"language-d2\">Us\u0142uga A: {\r\n  style: {\r\n    wype\u0142nienie: \"#e0e7ff\"\r\n    obramowanie: \"#4338ca\"\r\n    promie\u0144_naro\u017cnika: 8\r\n  }\r\n}\r\n\r\nUs\u0142uga B: {\r\n  style: {\r\n    wype\u0142nienie: \"#fef3c7\"\r\n    obramowanie: \"#d97706\"\r\n  }\r\n}\r\n\r\nUs\u0142uga A -&gt; Us\u0142uga B: Wy\u015blij wiadomo\u015b\u0107<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNoLLT7aVJqeqOBopVDNy6WgUFxSmZMKZSsolFcWpB5tystMBSIrBSXlVINU87Q0JYhkflJRYm5+eSJUzsTY2CI5ESpXUJSfm5l6tCU+L7Eo\/+ievMzsRCsFC5BcLS8XEPFyhUItdiLK4rTUNONkc+wWp1iamxuYKWEz3FFB104ByabwyqOzczKzFMozE1Pyc\/OPzj7SDgDw4085\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit D2 in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#d2:eNoLTi0qy0xOVXC0Uqjm5VJQKC6pzEmFshUU0jJzcqwUlJRTDVLN09KUIILFJUX52akgYRNjY4vkRKhwUn5RSmqRblFiSmZpsZWCBUi0lpcLiHi5gqG2OOG1JS01zTjZHMOWFEtzcwMzJWzmOSro2ikgGR6cmpei4JtaXJyYngoAKgc5Cw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Edytuj D2 w VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"ZKCxIsS\"><img loading=\"lazy\" alt=\"D2 styled blocks showing custom background colors and border styles for Service A and Service B - Text to diagram editor - VPasCode\" class=\"alignnone wp-image-1927 size-full\" decoding=\"async\" height=\"455\" loading=\"lazy\" sizes=\"auto, (max-width: 313px) 100vw, 313px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d6582049.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d6582049.png 313w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d6582049-206x300.png 206w\" width=\"313\"\/><\/p>\n<h2 style=\"font-size: 1.5rem; font-weight: bold; color: #1f2937; margin-top: 2rem; margin-bottom: 1rem; border-left: 4px solid #4f46e5; padding-left: 0.75rem;\">6. Szybki arkusz sk\u0142adni<\/h2>\n<table style=\"width: 100%; border-collapse: collapse; margin-bottom: 1.5rem;\">\n<thead>\n<tr style=\"background-color: #f9fafb;\">\n<th style=\"border: 1px solid #e5e7eb; padding: 0.75rem; text-align: left;\">Koncepcja<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 0.75rem; text-align: left;\">Przyk\u0142ad kodu<\/th>\n<th style=\"border: 1px solid #e5e7eb; padding: 0.75rem; text-align: left;\">Co robi<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><strong>Kierowane po\u0142\u0105czenie<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><code>A -&gt; B<\/code><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\">Rysuje strza\u0142k\u0119 wskazuj\u0105c\u0105 od A do B.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><strong>Etykieta linii<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><code>A -&gt; B: Wy\u015blij dane<\/code><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\">Dodaje tekst na po\u0142\u0105czeniu strza\u0142ki.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><strong>Strza\u0142ka dwukierunkowa<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><code>A &lt;-&gt; B<\/code><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\">Rysuje strza\u0142k\u0119 wskazuj\u0105c\u0105 w obu kierunkach.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><strong>Kontenery \/ Grupy<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><code>Serwer: { ... }<\/code><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\">Grupuje wiele kszta\u0142t\u00f3w w jednym polu.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><strong>Wyb\u00f3r kszta\u0142tu<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><code>kszta\u0142t: walec<\/code><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\">Zmienia standardowe pole na ikon\u0119 bazy danych, osob\u0119, chmur\u0119, klas\u0119 itp.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><strong>Komentarze<\/strong><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\"><code># M\u00f3j komentarz<\/code><\/td>\n<td style=\"border: 1px solid #e5e7eb; padding: 0.75rem;\">Komentarze jednolinijkowe s\u0105 ignorowane podczas renderowania.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>D2 to nowoczesne narz\u0119dzie oparte na tek\u015bcie do tworzenia jasnych, czytelnych schemat\u00f3w. Oznacza to \u201eDeklaratywne rysowanie schemat\u00f3w\u201d. W VPasCode D2 pozwala programistom i architektom rozwi\u0105za\u0144 przekszta\u0142ca\u0107 prosty kod tekstowy w czyste modele wizualne, nie musz\u0105c r\u0119cznie rysowa\u0107 kszta\u0142t\u00f3w. Wskaz\u00f3wka:Sk\u0142adnia D2&#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"template":"","meta":{"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"ld_collection":[14],"class_list":["post-2020","ld_docs","type-ld_docs","status-publish","hentry","ld_collection-vpascode-docs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>D2 Syntax | Text to diagram tool - VPasCode<\/title>\n<meta name=\"description\" content=\"Master D2 declarative diagramming in VPasCode. Easily build cloud architecture diagrams, ERDs, and workflow charts directly from simple code snippets.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/\" \/>\n<meta property=\"og:locale\" content=\"pl_PL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"D2 Syntax | Text to diagram tool - VPasCode\" \/>\n<meta property=\"og:description\" content=\"Master D2 declarative diagramming in VPasCode. Easily build cloud architecture diagrams, ERDs, and workflow charts directly from simple code snippets.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/\" \/>\n<meta property=\"og:site_name\" content=\"VPasCode\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d37a7527.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Szacowany czas czytania\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minuty\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/docs\\\/vpascode-docs\\\/d2-playbook\\\/d2-syntax-basics\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/docs\\\/vpascode-docs\\\/d2-playbook\\\/d2-syntax-basics\\\/\",\"name\":\"D2 Syntax | Text to diagram tool - VPasCode\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/docs\\\/vpascode-docs\\\/d2-playbook\\\/d2-syntax-basics\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/docs\\\/vpascode-docs\\\/d2-playbook\\\/d2-syntax-basics\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/img_6a742d37a7527.png\",\"datePublished\":\"2026-08-06T06:15:46+00:00\",\"description\":\"Master D2 declarative diagramming in VPasCode. Easily build cloud architecture diagrams, ERDs, and workflow charts directly from simple code snippets.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/docs\\\/vpascode-docs\\\/d2-playbook\\\/d2-syntax-basics\\\/#breadcrumb\"},\"inLanguage\":\"pl-PL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/docs\\\/vpascode-docs\\\/d2-playbook\\\/d2-syntax-basics\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/docs\\\/vpascode-docs\\\/d2-playbook\\\/d2-syntax-basics\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/img_6a742d37a7527.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/img_6a742d37a7527.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/docs\\\/vpascode-docs\\\/d2-playbook\\\/d2-syntax-basics\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lean Docs\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/docs\\\/%ld_collection%\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Podstawy sk\u0142adni D2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/#website\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/\",\"name\":\"VPasCode\",\"description\":\"by Visual Paradigm\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pl-PL\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/#organization\",\"name\":\"VPasCode\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"width\":128,\"height\":138,\"caption\":\"VPasCode\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/pl\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"D2 Syntax | Text to diagram tool - VPasCode","description":"Master D2 declarative diagramming in VPasCode. Easily build cloud architecture diagrams, ERDs, and workflow charts directly from simple code snippets.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/","og_locale":"pl_PL","og_type":"article","og_title":"D2 Syntax | Text to diagram tool - VPasCode","og_description":"Master D2 declarative diagramming in VPasCode. Easily build cloud architecture diagrams, ERDs, and workflow charts directly from simple code snippets.","og_url":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/","og_site_name":"VPasCode","og_image":[{"url":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d37a7527.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Szacowany czas czytania":"3 minuty"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/","url":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/","name":"D2 Syntax | Text to diagram tool - VPasCode","isPartOf":{"@id":"https:\/\/www.vpascode.com\/pl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/#primaryimage"},"image":{"@id":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d37a7527.png","datePublished":"2026-08-06T06:15:46+00:00","description":"Master D2 declarative diagramming in VPasCode. Easily build cloud architecture diagrams, ERDs, and workflow charts directly from simple code snippets.","breadcrumb":{"@id":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/#breadcrumb"},"inLanguage":"pl-PL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/"]}]},{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/#primaryimage","url":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d37a7527.png","contentUrl":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/08\/img_6a742d37a7527.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vpascode.com\/pl\/docs\/vpascode-docs\/d2-playbook\/d2-syntax-basics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vpascode.com\/pl\/"},{"@type":"ListItem","position":2,"name":"Lean Docs","item":"https:\/\/www.vpascode.com\/pl\/docs\/%ld_collection%\/"},{"@type":"ListItem","position":3,"name":"Podstawy sk\u0142adni D2"}]},{"@type":"WebSite","@id":"https:\/\/www.vpascode.com\/pl\/#website","url":"https:\/\/www.vpascode.com\/pl\/","name":"VPasCode","description":"by Visual Paradigm","publisher":{"@id":"https:\/\/www.vpascode.com\/pl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vpascode.com\/pl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pl-PL"},{"@type":"Organization","@id":"https:\/\/www.vpascode.com\/pl\/#organization","name":"VPasCode","url":"https:\/\/www.vpascode.com\/pl\/","logo":{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/www.vpascode.com\/pl\/#\/schema\/logo\/image\/","url":"https:\/\/www.vpascode.com\/pl\/wp-content\/uploads\/sites\/9\/2026\/06\/cropped-vp-online-logo-v1.png","contentUrl":"https:\/\/www.vpascode.com\/pl\/wp-content\/uploads\/sites\/9\/2026\/06\/cropped-vp-online-logo-v1.png","width":128,"height":138,"caption":"VPasCode"},"image":{"@id":"https:\/\/www.vpascode.com\/pl\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.vpascode.com\/pl\/wp-json\/wp\/v2\/ld_docs\/2020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vpascode.com\/pl\/wp-json\/wp\/v2\/ld_docs"}],"about":[{"href":"https:\/\/www.vpascode.com\/pl\/wp-json\/wp\/v2\/types\/ld_docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.vpascode.com\/pl\/wp-json\/wp\/v2\/users\/3"}],"wp:attachment":[{"href":"https:\/\/www.vpascode.com\/pl\/wp-json\/wp\/v2\/media?parent=2020"}],"wp:term":[{"taxonomy":"ld_collection","embeddable":true,"href":"https:\/\/www.vpascode.com\/pl\/wp-json\/wp\/v2\/ld_collection?post=2020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}