CanvasFrame
Output preview with zoom + bg.
Loading…
Output preview with zoom + bg.
Loading…
Output preview area — wraps canvas/content with aspect ratio, zoom, and background options.
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Canvas content. |
| aspectRatio | number | string | 16/9 | Preview aspect ratio. |
| zoom | number | 1 | Zoom level. |
| background | "transparent" | "white" | "custom" | transparent | Background mode. |
| onZoomChange | (zoom: number) => void | — | Zoom change handler. |
| className | string | — | Optional CSS class. |
Also copy lib/utils.ts (cn helper):