Skip to content

CropperViewer

The CropperViewer interface provides properties and methods for manipulating the layout and presentation of <cropper-viewer> elements.

Examples

Basic

TIP

The default height of this element is 0.

Connect to CropperSelection

Properties

Inherits properties from its parent, CropperElement, and implements the following properties:

NameTypeDefaultOptionsDescription
resizestring"vertical""both", "horizontal", "vertical", "none"Indicates whether this element is resizable, and if so, in which directions.
selectionstring""-Indicates the source selection to view. It must be a valid selector for document.querySelector.
slottablebooleanfalse-Indicates whether this element is slottable.

Slots

There are no available slots in this element.

You can enable the default slot by setting the slottable property to true:

html
<cropper-viewer slottable></cropper-viewer>

Released under the MIT License.