Screenshot the User's Preview
screenshot_previewCapture a screenshot of the user app. Call it whenever you want to SEE what the app currently looks like (layout, styling, rendered state) or want to debug the app. By default it shows whatever device the user has the preview on. Pass viewport to see it on another device — this is how to check a mobile or tablet layout: the preview switches to that device for the capture only, then back. Never build a separate "mobile" page or example just to look at a narrow layout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| viewport | No | Device to capture on: "desktop", "iphone-15", "pixel-7", "ipad" — the preview's own device presets (Desktop, iPhone (393×852), Pixel (412×915), iPad (820×1180)) — or a custom "WIDTHxHEIGHT" such as "600x800". "iphone-15" is the usual phone check. Omit to capture what the user sees. | |
| projectId | Yes |