Optional
ablesYou can add your custom able.
[]
Optional
boundsYou can set up boundaries.
null
Optional
checkChecks whether this is an element to input text or contentEditable, and prevents dragging.
false
Optional
checkWhether to recalculate when the size to be calculated is different from the actual size
true
Optional
classYou can specify the className of the moveable controlbox.
""
Optional
clickableWhether to trigger the moveable's click event.
true
Optional
clipYou can drag the clip by setting clipArea.
false
Optional
clipAdd clip guidelines in the horizontal direction.
[]
Optional
clip% Can be used instead of the absolute px (rect
not possible)
false
Optional
clipDistance value that can snap to clip guidelines.
5
Optional
clipWhether the clip is bound to the target.
false
Optional
clipAdd clip guidelines in the vertical direction.
[]
Optional
clippableWhether to clip the target.
false
Optional
containerA container into which Moveables are inserted. Set it only when used within the slot of Web Components or when the container is different.
parentElement
Optional
controlBy adding padding to the control, you can increase the area of the control that can be clicked and dragged.
Either rotateAroundControls
or displayAroundControls
can be used.
0.44.0
options--options-control-padding
0
Optional
cspadd nonce property to style for CSP.
""
Optional
customYou can force the custom clipPath. (defaultClipPath < style < customClipPath < dragging clipPath)
Optional
defaultIf clippath is not set, the default value can be set. (defaultClipPath < style < customClipPath < dragging clipPath)
Optional
defaultSets the initial transform origin of the group.
"50% 50%"
Optional
defaultSets the initial rotation of the group.
0
Optional
displayYou can expand the area around the control.
Either rotateAroundControls
or displayAroundControls
can be used.
You can set the area through the controlPadding
value.
0.44.0
options--options-control-padding
false
Optional
dragInstead of firing an event on the target, we add it to the moveable control element. You can use click and clickGroup events.
if group, true, else fals
Optional
dragContainer area where drag works
window
Optional
dragWhether to drag the focused input
If checkInput
is true, this option is not applied.
0.47.0
options--options-drag-focused-input
false
Optional
dragThe external target(s) to drag Moveable target(s)
target
Optional
dragIf dragTarget is set directly, taget itself cannot be dragged. Whether to drag the target as well.
false
Optional
dragWhen dragging the target, the clip also moves.
true
Optional
draggableWhether or not target can be dragged.
false
Optional
edgeWhether to scale and resize through edge lines. You can use "n", "w", "s", "e" in LineDirection array.
false
Optional
edgeWhether to move by dragging the edge line
false
Optional
elementAdd guidelines for the element.
[]
Optional
elementYou can specify the snap directions of elements.
true (true is all directions)
Optional
Private
firstsingle => group로 변환과정에 도형 유지를 위한 첫 렌더링 state
Optional
flushIf you are using React 18's concurrent mode, use flushSync
for UI sync.
empty function
import { flushSync } from "react-dom";
<Moveable flushSync={flushSync} />
Optional
getSets a function to get the scroll position.
scrollContainer's scrollTop, scrollLeft
Optional
Private
groupableOptional
groupableProps that work when group
{
roundable: true,
groupableProps: {
roundable: false,
},
}
Optional
hideWhether to hide the line in child moveable for group corresponding to the rect of the target.
false
Optional
hideWhether to hide the line corresponding to the rect of the target.
false
Optional
hideHides the guidelines that appear when using the throttleDragRotate
prop.
false
Optional
horizontalAdd guidelines in the horizontal direction.
[]
Optional
individualCreate targets individually, not as a group.
individual-group--individual-group-draggable-scalable-rotatable
Optional
individualWhen using individualGroupable you can pass props to child moveable.
individual-group--individual-group-groupable-props
0.44.0
Optional
innerYou can set up inner boundaries.
null
Optional
isWhether to show guideline of snap by grid
false
Optional
isWhether to show element inner snap distance
false
Optional
isWhether to show a round control that does not actually exist as a shadow
false
Optional
isWhether to show snap distance.
true
Optional
keepWhen resize or scale, keeps a ratio of the width, height.
false
Optional
keepThe size can be changed by format and throttle, but the ratio is maintained at the end. Forced true when using groups.
false
Optional
lineBy adding padding to the line, you can increase the area of the line that can be clicked and dragged.
0.43.0
options--options-line-padding
0
Optional
maxMaximum number of round controls. It moves in proportion by control. [horizontal, vertical]
[4, 4]
Optional
maxMaximum distance to which element gap guidelines can be snapped.
Infinity
Optional
maxMaximum distance to which element guidelines can be snapped.
Infinity
Optional
minMinimum number of round controls. It moves in proportion by control. [horizontal, vertical]
[0, 0]
Optional
originWhether or not the origin control box will be visible or not.
true
Optional
originWhether to drag origin.
false
Optional
origin% Can be used instead of the absolute px.
true
Optional
paddingAdd padding around the target to increase the drag area.
null
Optional
passSet pointerEvents: none;
css to pass events in dragArea.
false
Optional
persistData for first render
null
Optional
pinchWhether the container containing the target becomes a pinch.
true
Optional
pinchMinimum distance to pinch.
20
Optional
pinchableWhether or not target can be pinched with draggable, resizable, scalable, rotatable.
false
Optional
preventPrevent click event on dragStart. (mousedown, touchstart)
false
Optional
preventPrevent click event on drag. (mousemove, touchmove)
true
Optional
preventWhether to call preventDefault on touchstart or mousedown
0.44.0
true
Optional
preventWhether to prevent dragging using the right mouse button
true
Optional
preventWhether to prevent dragging using the wheel (middle) mouse button
true
Optional
propsYou can use props in object format or custom props.
empty object
Optional
renderSet directions to show the control box.
false if rotatable, ["n", "nw", "ne", "s", "se", "sw", "e", "w"] otherwise
Optional
Private
requestOptional
resizableWhether or not target can be resized.
false
Optional
resizeFunction to convert size for resize.
oneself
Optional
resolveSets the control that will cause resize along with rotate. (Only Single Target, Only resizable, Beta)
null
Optional
rootMoveable Root Container (No Transformed Container)
parentElement
options--options-root-container
Optional
rotatableWhether or not target can be rotated.
false
Optional
rotateYou can rotate around direction controls.
Either rotateAroundControls
or displayAroundControls
can be used.
0
Optional
rotationYou can specify the position of the rotation.
"top"
Optional
rotationSet additional rotationTargets.
null
Optional
roundWhether you can add/delete round controls by double-clicking a line or control.
true
Optional
roundThe padding value of the position of the round control
0
Optional
round% Can be used instead of the absolute px
false
Optional
roundableWhether to show and drag border-radius.
false
Optional
scalableWhether or not target can be scaled.
false
Optional
scrollThe container to which scroll is applied
container
Optional
scrollOption to scroll with dragging
0.43.0
support-scroll--scrolling-scrollable
const scrollOptions = {
container: () => viewer.getContainer(),
threshold: 20,
getScrollPosition: () => {
return [
viewer.getScrollLeft({ absolute: true }),
viewer.getScrollTop({ absolute: true }),
];
},
};
Optional
scrollExpand the range of the scroll check area.
0
Optional
scrollTime interval that occurs when scrolling occurs when dragging is maintained If set to 0, it does not occur.
0
Optional
scrollableWhether or not target can be scrolled to the scroll container
false
Optional
snapA snap container that is the basis for snap, bounds, and innerBounds.
null
Optional
snapsnap distance digits.
0
Optional
snapYou can specify the directions to snap to the target.
true (true is all directions)
Optional
snapYou can set the text format of the distance shown in the guidelines.
oneself
Optional
snapWhen you drag, make the gap snap in the element guidelines.
true
Optional
snapIn the case of a group, if snapGridWidth
and snapGridHeight
are used, all children can be snapped.
Custom fixed directions are not yet allowed. Also, it cannot be applied if rotated.
false
Optional
snapIf height size is greater than 0, you can horizontal snap to the grid.
0 (0 is not used)
Optional
snapIf width size is greater than 0, you can vertical snap to the grid.
0 (0 is not used)
Optional
snapDistance horizontal between horizontal value that can snap to guidelines.
5
Optional
snapDistance value that render snapped guidelines.
1
Optional
snapdegree angles to snap to rotation
[]
Optional
snapSnap works if abs(current rotation - snapRotationDegrees) < snapRotationThreshold
.
5
Optional
snap/**
snapHorizontalThreshold
and snapVerticalThreshold
0
*
Optional
snapDistance Horizontal value that can snap to guidelines.
5
Optional
snappableWhether or not target can be snapped to the guideline.
false
Optional
startstart angle(degree) of x,y for throttleDragRotate when drag.
0
Optional
stopWhether to prevent bubbling of events like mousedown, touchstart, etc.
false
Optional
svgSets the transform origin based on the svg target. If not set, it is set as the transform origin based on the owner of svg.
0.47.0
""
Optional
targetOptional
target
Optional
throttlethrottle of x, y when drag.
0
Optional
throttlethrottle of angle(degree) of x,y when drag.
0
Optional
throttlethrottle of width, height when resize.
1
Optional
throttlethrottle of angle(degree) when rotate.
0
Optional
throttlethrottle of scaleX, scaleY when scale.
0
Optional
transformThe default transformOrigin of the target can be set in advance.
""
Optional
translateZYou can set the translateZ value of moveable.
50
Optional
triggerLets generate events of ables at the same time. (like Resizable, Scalable)
false
Optional
useWhether to accurately show the position of a movable control box Because getBoundingClientRect is used, css zoom, transform: rotate between container and rootContainer cannot be used. group is not supported.
false
Optional
useUse the defaultGroupRotate even if the children's rotations match.
false
Optional
useWhether the target size, pos in inline style is detected and updated whenever it changes.
It is more effective when used together with useResizeObserver
.
false
options--options-mutation-observer
Optional
useWhether the target size is detected and updated whenever it changes.
It is more effective when used together with useMutationObserver
.
false
options--options-resize-observer
Optional
verticalAdd guidelines in the vertical direction.
[]
Optional
viewIf you want to set the dragging information to the viewer, refer to the following.
null
options--options-view-container
Optional
Private
warpWhether to warp itself to the container itself. Don't set it.
false
Optional
warpableWhether or not target can be warped.
false
Optional
zoomZooms in the elements of a moveable.
1
extended options for Moveable with custom properties