w

Cursor Canvas Tool

Paste a Cursor .canvas.tsx file, preview it in the browser, and publish a short shareable link.

Examples

Each block is a live preview. Expand Canvas source to copy the file, or open Cursor Canvas and click Load example for the full public-type gallery.

Hello canvas

Minimal default export: heading plus supporting text.

Live preview

hello.canvas.tsx

Release health

Stats, callouts, and a two-column grid — typical status dashboards.

Live preview

metrics.canvas.tsx

Traffic mix

Stacked BarChart plus a donut PieChart. Chart data is sample telemetry.

Live preview

charts.canvas.tsx

Review board

Striped Table, a named-entity Card, and a TodoList of the share flow.

Live preview

review.canvas.tsx

Authoring rules

  • Import only from cursor/canvas (React hooks are provided by the host)
  • Export a default function component
  • Prefer layout primitives (Stack, Row, Grid) over raw HTML
  • Use useCanvasState for inputs that should survive preview rebuilds
  • useCanvasAction on the web opens Cursor via deeplink; relative openFile paths prefill a chat prompt instead of jumping to a file
Was this page helpful?