Skip to content

Pages

Show your app's own pages, each in a browser-sized window.

Add routes to pages in .canvas/config.json. true shows them all.

// .canvas/config.json
{
  "pages": ["/", "/pricing", "/changelog"]
}

Pages are the real app, so they have its head, fonts and providers; only components need the setup.

Dynamic routes

A page must be a route the canvas can find. A page behind a dynamic segment, like /:slug, may not resolve: listing "/my-slug" shows nothing, and .canvas/layout.json marks its card "gone". Show what that page renders as a component card instead, with a *.canvas.tsx file beside it.

// src/explorations/launch-type.canvas.tsx
import LaunchTypeExploration from "./launch-type";

export const LaunchType = () => <LaunchTypeExploration />;