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.
Properties
Section titled “Properties”Set them as HTML attributes.
api-pathAPI endpoint URL (optional, defaults to production)
Type:
stringauto-searchAutomatically trigger visual search after crop. Set to false to handle search manually via vviinnCropperCropEnd event
Type:
boolean· Default:truecss-urlURL to external CSS file for custom styling
Type:
string· Default:nullsave-image-modeSave to Local Storage mode for uploaded image
Type:
"always" | "never" | "once"· Default:"once"tokenVviinn customer's token
Type:
stringwidthType:
number· Default:288
Events
Section titled “Events”Listen with document.addEventListener(). The pages under Events describe the data each event carries.
| Event | Description |
|---|---|
vviinnCropperCropEnd | Triggered when crop ends with enriched data including normalized coordinates for visual-search API |
vviinnCropperLoadImage | — |
vviinnImageCrop | — |
vviinnNoResult | Triggered when a visual search request fails |