Skip to content

Props

PropTypeDefaultDescription
wNumber100Width
hNumber100Height
xNumber0Left, relative to parent
yNumber0Top, relative to parent
rNumber0Rotation in degrees
zNumber | String''z-index
bgString''Background image URL
min-widthNumber0Minimum width during resize
min-heightNumber0Minimum height during resize
max-widthNumberInfinityMaximum width during resize
max-heightNumberInfinityMaximum height during resize
lockBooleanfalseLock aspect ratio
activeBooleantrueActive state (controls visible)
activeableBooleantrueWhether the element can be activated
draggableBooleantrueAllow drag
resizeableBooleantrueAllow resize
rotateableBooleantrueAllow rotate
sticksArray<string>all 9Subset of handles. Possible values: 'tl' | 'tm' | 'tr' | 'mr' | 'br' | 'bm' | 'bl' | 'ml' | 'angle'
uuidString | Number''Unique id (used as key in nesting and echoed in events)
childrensArray<Object>undefinedRecursive props for nested children
childWrapAttrObjectundefinedAttrs for the wrapper around children
overflowString''Wrapper overflow (merged into childWrapAttr if both provided)
stick-hover-render(cursorRotate: number) => { x: number; y: number; htmlText: string }undefinedCustom cursor renderer for sticks (returns an SVG string with offsets)
limit-x[number, number] | nullnullLimit the transformed rectangle's bounding box on the x axis in parent coordinates
limit-y[number, number] | nullnullLimit the transformed rectangle's bounding box on the y axis in parent coordinates

Notes

  • When min-width or min-height is set, dragging past the opposite edge will not flip; min takes over.
  • lock ratio is based on the snapshot at mousedown.
  • sticks: [] hides every handle.
  • r is both a prop and a watch source; external updates sync to internal state.
  • limit-x and limit-y can be used independently. The array must be [min, max], with min <= max.

See Events for the pos payload structure.