Quartz's default canvas page plugin.
  • TypeScript 84.8%
  • SCSS 15.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-09 23:01:19 +01:00
.changeset chore: version package 2026-11-09 04:00:45 +00:00
.github/workflows ci: run ci.yml on the changesets version PR and report it as a commit status 2026-11-09 03:47:26 +01:00
src fix: canvas pages carry the .canvas file path (filePath/relativePath) 2026-11-09 02:41:34 +01:00
test fix: canvas pages carry the .canvas file path (filePath/relativePath) 2026-11-09 02:41:34 +01:00
types chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.eslintrc.json chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.gitignore chore: migrate to npm publishing 2026-07-23 09:06:47 +02:00
.prettierignore chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.prettierrc Initial commit 2026-02-14 14:33:48 +01:00
CHANGELOG.md chore: version package 2026-11-09 04:00:45 +00:00
LICENSE Initial commit 2026-02-14 14:33:48 +01:00
package-lock.json chore: version package 2026-11-09 04:00:45 +00:00
package.json chore: version package 2026-11-09 04:00:45 +00:00
README.md docs(readme): Quartz 5.1 — npm install and config, correct options and defaults 2026-11-09 22:56:17 +01:00
tsconfig.build.json fix: use separate tsconfig for DTS build to avoid vitest dependency 2026-03-22 13:12:01 +01:00
tsconfig.json Initial commit 2026-02-14 14:33:48 +01:00
tsup.config.ts build: keep preact and the other shared packages external (tsup's noExternal overrode them) 2026-11-09 04:49:08 +01:00
vitest.config.ts Initial commit 2026-02-14 14:33:48 +01:00

@quartz-community/canvas-page

A page type plugin that renders JSON Canvas (.canvas) files as interactive, pannable and zoomable canvas pages. Supports the full JSON Canvas 1.0 spec, including text nodes with Markdown rendering, file nodes that link to other pages, link nodes for external URLs, group nodes for visual organization, and edges between nodes rendered as SVG paths with optional labels, arrow markers, and colors.

Installation

npx quartz plugin add @quartz-community/canvas-page

It is already included (and enabled) in the default quartz.config.yaml.

Usage

plugins:
  - source: "@quartz-community/canvas-page"
    enabled: true

For advanced use cases, you can override in TypeScript:

import * as ExternalPlugin from "./.quartz/plugins";

ExternalPlugin.CanvasPage({
  enableInteraction: true,
  initialZoom: 1,
});

Features

  • Text nodes: Render Markdown content including headings, bold, italic, strikethrough, lists, links, and code blocks via GFM support.
  • File nodes: Link to other pages in your vault with popover previews on hover.
  • Link nodes: Reference external URLs.
  • Group nodes: Visual grouping containers with optional labels and background colors.
  • Edges: SVG connections between nodes with optional labels, arrow markers, and colors. Supports all four sides and both preset colors (1–6) and custom hex colors.
  • Canvas frame: Canvas pages use the plugin's own fullscreen canvas page frame with a togglable left sidebar (set layout.byPageType.canvas.template: default for the standard three-column layout). Embedded canvases get a fullscreen toggle button instead.
  • Preset colors: Six preset colors (red, orange, yellow, green, cyan, purple) plus custom hex colors for nodes and edges.

Configuration

Option Type Default Description
enableInteraction boolean true Whether to enable pan and zoom interaction on the canvas.
initialZoom number 1 The initial zoom level when the canvas is first displayed.
minZoom number 0.1 The minimum zoom level allowed when zooming out.
maxZoom number 5 The maximum zoom level allowed when zooming in.

Documentation

See the Quartz documentation for more information.

License

MIT