React Sketch Canvas
APIInterfaces

ExportImageOptions

Defined in: types/canvas.ts:23

Size options for raster image exports.

Remarks

When omitted, the exported image uses the rendered canvas element's current width and height. Provide both values to export a fixed-size image regardless of the on-screen canvas size.

Properties

height?

readonly optional height?: number

Defined in: types/canvas.ts:35

Height of the exported image in pixels.

Default Value

The current rendered canvas height.

width?

readonly optional width?: number

Defined in: types/canvas.ts:29

Width of the exported image in pixels.

Default Value

The current rendered canvas width.

On this page