@@ -87,6 +87,7 @@ excalidraw-cli convert diagram.excalidraw --format svg --no-export-background
8787| ` {Label} ` | Diamond | Decisions, conditionals |
8888| ` (Label) ` | Ellipse | Start/End points |
8989| ` [[Label]] ` | Database | Data storage |
90+ | ` [Label @fillStyle:hachure @backgroundColor:#a5d8ff] ` | Styled node | Add inline node style attributes |
9091| ` -> ` | Arrow | Connection |
9192| ` --> ` | Dashed Arrow | Dashed connection |
9293| ` -> "text" -> ` | Labeled Arrow | Connection with label |
@@ -99,6 +100,41 @@ excalidraw-cli convert diagram.excalidraw --format svg --no-export-background
99100{Valid?} -> "no" -> [Show Error] -> [Enter Credentials]
100101```
101102
103+ ### Node Styling
104+
105+ Add shape-level styling directly to nodes with inline ` @key:value ` attributes:
106+
107+ ``` excalidraw
108+ (Start) -> [Enter Credentials @fillStyle:hachure @backgroundColor:#a5d8ff] -> {Valid?}
109+ {Valid?} -> "no" -> [Show Error @backgroundColor:#ffc9c9 @strokeStyle:dashed] -> [Enter Credentials]
110+ ```
111+
112+ For repeated or shared nodes, define defaults with an ` @node ` block:
113+
114+ ``` excalidraw
115+ @node [Enter Credentials]
116+ fillStyle: solid
117+ backgroundColor: #a5d8ff
118+
119+ (Start) -> [Enter Credentials @fillStyle:hachure] -> {Valid?}
120+ ```
121+
122+ Supported node style keys:
123+
124+ - ` fillStyle ` : ` solid ` , ` hachure ` , ` cross-hatch `
125+ - ` backgroundColor `
126+ - ` strokeColor `
127+ - ` strokeWidth `
128+ - ` strokeStyle ` : ` solid ` , ` dashed ` , ` dotted `
129+ - ` roughness `
130+ - ` opacity `
131+
132+ Precedence rules:
133+
134+ - ` @node ` blocks provide defaults for matching nodes
135+ - inline node attributes override block values
136+ - repeated references to the same node merge explicit style properties with later values winning per property
137+
102138### Directives
103139
104140```
0 commit comments