Skip to content

ScreenshotRenderOptions

ScreenshotRenderOptions = object

Defined in: types.ts:101

Screenshot-only render options that can be set in config or edited in Studio.

Resolution comes from the captured clip scaled by the capture device pixel density (not a preset). There is no frame toggle: the configured background (and the frame shadow and rounded corners) appear only when there is canvas area around the shot for them to fill, which is created by margin and/or an explicit aspectRatio. With neither, the output is the bare clip.

The clip itself is never set here: it is recorded only from a crop() call or page.screenshot({ clip }) (see ResolvedScreenshotRenderOptions).

optional aspectRatio?: AspectRatio | "auto"

Defined in: types.ts:116

Output canvas aspect ratio. 'auto' (the default) hugs the (cropped) shot plus any margin, with no letterbox bars. An explicit ratio centers the framed shot in that canvas and fills the surround with the background.


optional format?: ScreenshotOutputFormat

Defined in: types.ts:103

Output image format. Defaults to 'png'.


optional margin?: number

Defined in: types.ts:110

Margin between the framed shot and the canvas edge, in CSS pixels. A value greater than 0 creates a background gutter around the shot (and gives the frame shadow and rounded corners room to render). Defaults to 0 (the canvas hugs the shot, no background visible).


optional mouse?: ScreenshotMouseOptions

Defined in: types.ts:118

Cursor options for the still (the cursor is hidden by default).