Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kepano/obsidian-skills/llms.txt
Use this file to discover all available pages before exploring further.
Nodes are the objects placed on the canvas. They are stored in the top-level nodes array of a .canvas file, and array order determines z-index: the first node in the array sits at the bottom layer, while the last node sits at the top. Every node, regardless of type, shares a common set of generic attributes that define its identity, position, and dimensions on the canvas.
Generic Node Attributes
All four node types inherit these attributes. The type field determines which additional type-specific attributes are required.
| Attribute | Required | Type | Description |
|---|
id | Yes | string | Unique 16-char hex identifier |
type | Yes | string | text, file, link, or group |
x | Yes | integer | X position in pixels |
y | Yes | integer | Y position in pixels |
width | Yes | integer | Width in pixels |
height | Yes | integer | Height in pixels |
color | No | canvasColor | Preset "1"–"6" or hex (e.g., "#FF0000") |
Text Nodes
Text nodes display plain text with Markdown syntax. They are the most common node type and support the full Markdown feature set supported by the host application.
| Attribute | Required | Type | Description |
|---|
text | Yes | string | Plain text with Markdown syntax |
{
"id": "6f0ad84f44ce9c17",
"type": "text",
"x": 0,
"y": 0,
"width": 400,
"height": 200,
"text": "# Hello World\n\nThis is **Markdown** content."
}
Use \n for line breaks in JSON strings. Do not use the literal \\n — Obsidian renders that as the characters \ and n rather than an actual newline.
File Nodes
File nodes embed a reference to a file within the system. The file attribute holds the path to the target file. An optional subpath can point to a specific heading or block anchor within that file.
| Attribute | Required | Type | Description |
|---|
file | Yes | string | Path to file within the system |
subpath | No | string | Link to heading or block (starts with #) |
{
"id": "a1b2c3d4e5f67890",
"type": "file",
"x": 500,
"y": 0,
"width": 400,
"height": 300,
"file": "Attachments/diagram.png"
}
Link Nodes
Link nodes display an external URL as an embedded web preview on the canvas.
| Attribute | Required | Type | Description |
|---|
url | Yes | string | External URL |
{
"id": "c3d4e5f678901234",
"type": "link",
"x": 1000,
"y": 0,
"width": 400,
"height": 200,
"url": "https://obsidian.md"
}
Group Nodes
Groups are visual containers for organizing other nodes. To place a node inside a group, position its x and y coordinates within the group’s bounding box. Groups can have an optional label, a background image, and a background display style.
| Attribute | Required | Type | Description |
|---|
label | No | string | Text label for the group |
background | No | string | Path to background image |
backgroundStyle | No | string | cover, ratio, or repeat |
{
"id": "d4e5f6789012345a",
"type": "group",
"x": -50,
"y": -50,
"width": 1000,
"height": 600,
"label": "Project Overview",
"color": "4"
}
Colors
The canvasColor type is accepted by the color attribute on all node types. It can be either a preset number string or a hex color string.
| Preset | Color |
|---|
"1" | Red |
"2" | Orange |
"3" | Yellow |
"4" | Green |
"5" | Cyan |
"6" | Purple |
Preset color values are intentionally undefined in the spec — applications use their own brand colors to render them. Hex strings such as "#FF0000" are also valid and will render the exact color specified.
ID Generation
Every node must have a unique id consisting of a 16-character lowercase hexadecimal string, representing a 64-bit random value. IDs must be unique across both the nodes and edges arrays.
"6f0ad84f44ce9c17"
"a3b2c1d0e9f8a7b6"
When adding nodes to an existing canvas, always check existing IDs first to avoid collisions.
Layout Guidelines
The JSON Canvas coordinate system extends infinitely in all directions. The following rules help produce clean, readable layouts:
- Coordinates can be negative — the canvas has no fixed origin
x increases to the right; y increases downward; position marks the top-left corner of the node
- Space nodes 50–100px apart to avoid visual crowding
- Leave 20–50px padding inside group boundaries for contained nodes
- Align positions to a grid (multiples of 10 or 20) for consistent layouts
The table below shows suggested sizes for common node uses:
| Node Type | Suggested Width | Suggested Height |
|---|
| Small text | 200–300 | 80–150 |
| Medium text | 300–450 | 150–300 |
| Large text | 400–600 | 300–500 |
| File preview | 300–500 | 200–400 |
| Link preview | 250–400 | 100–200 |