Skip to content
vviinn DocsDocs Beta

Cropper (vviinn-cropper)

Generated from vviinn-widgets 2.228.0, the latest release when these docs were built. If you pin an older version, some of these may not be in it yet — check the Changelog.

Try the properties live in the Playground.

Set them as HTML attributes.

api-path

API endpoint URL (optional, defaults to production)

Type: string

Automatically trigger visual search after crop. Set to false to handle search manually via vviinnCropperCropEnd event

Type: boolean · Default: true

css-url

URL to external CSS file for custom styling

Type: string · Default: null

save-image-mode

Save to Local Storage mode for uploaded image

Type: "always" | "never" | "once" · Default: "once"

token

Vviinn customer's token

Type: string

width

Type: number · Default: 288

Listen with document.addEventListener(). The pages under Events describe the data each event carries.

EventDescription
vviinnCropperCropEndTriggered when crop ends with enriched data including normalized coordinates for visual-search API
vviinnCropperLoadImage—
vviinnImageCrop—
vviinnNoResultTriggered when a visual search request fails