Cursor Canvas Tool
Paste a Cursor .canvas.tsx file, preview it in the browser, and publish a short shareable link.
Advanced Features
Compilation sandbox
Source is compiled in the browser with Sucrase, then evaluated against a module allowlist:
- Allowed:
cursor/canvas,react,react/jsx-runtime,react/jsx-dev-runtime - Any other import is blocked at compile time
- The file must contain
from "cursor/canvas"orfrom 'cursor/canvas' - Maximum source length is 200,000 characters
This is a preview sandbox, not a general React bundler. npm packages, CSS files, and local workspace imports will not resolve.
Theme
Preview follows the site light/dark color mode through useHostTheme. Rebuilds when you toggle the theme.
Interactive state
useCanvasState persists control values across rebuilds in the current page. Forms, pills, and toggles keep their values while you edit nearby source.
Live preview
Release health
Sample data · not connected to production
Charts, tables, and tasks
This preview implements the public cursor/canvas primitives used in Cursor galleries: layout, typography, cards, callouts, stats, tables, charts, todos, diffs, and DAG helpers.
Live preview
Traffic mix
Sample telemetry · stacked series and donut share
Share pages
- Share URLs look like
/cursor-canvas/cv_xxxx - Each successful open increments
viewCount(the author's own views do not) - Links can be public or password protected, and can expire
- Open editor on the share page is shown only to the author (current session user)
- Identical source MD5 from the same owner reuses the existing record and updates access settings (
reused: true) - The author can delete links from Published links
Host actions
On the web, useCanvasAction opens Cursor through official deeplinks. newComposerChat prefills a chat prompt. Absolute openFile paths use cursor://file/...; workspace-relative paths cannot be resolved from the browser, so they also prefill a prompt. openAgent has no public deeplink, so it prefills a prompt with the conversation id. The OS still asks you to confirm before Cursor launches.