Moveable
    Preparing search index...

    Interface MoveableProps

    interface MoveableProps {
        ables?: Able<IObject<any>, IObject<any>>[];
        bounds?: BoundType | null;
        checkInput?: boolean;
        checkResizableError?: boolean;
        className?: string;
        clickable?: boolean;
        clipArea?: boolean;
        clipHorizontalGuidelines?: (string | number)[];
        clippable?: boolean | ClippableOptions;
        clipRelative?: boolean;
        clipSnapThreshold?: number;
        clipTargetBounds?: boolean;
        clipVerticalGuidelines?: (string | number)[];
        container?: SVGElement | HTMLElement | null;
        controlPadding?: number;
        cspNonce?: string;
        customClipPath?: string;
        defaultClipPath?: string;
        defaultGroupOrigin?: string;
        defaultGroupRotate?: number;
        displayAroundControls?: boolean;
        dragArea?: boolean;
        dragContainer?: Window | MoveableRefType<HTMLElement>;
        dragFocusedInput?: boolean;
        draggable?: boolean;
        dragTarget?: MoveableRefType<SVGElement | HTMLElement>;
        dragTargetSelf?: boolean;
        dragWithClip?: boolean;
        edge?: boolean | LineDirection[];
        edgeDraggable?: boolean | LineDirection[];
        elementGuidelines?: (
            ElementGuidelineValueOption
            | MoveableRefType<Element>
        )[];
        elementSnapDirections?: boolean | SnapDirections;
        flushSync?: (callback: () => void) => void;
        getScrollPosition?: (
            e: { direction: number[]; scrollContainer: HTMLElement },
        ) => number[];
        groupableProps?: Record<string, any>;
        hideChildMoveableDefaultLines?: boolean;
        hideDefaultLines?: boolean;
        hideThrottleDragRotateLine?: boolean;
        horizontalGuidelines?: (string | number | PosGuideline)[];
        individualGroupable?: boolean;
        individualGroupableProps?: (
            element: SVGElement | HTMLElement | null | undefined,
            index: number,
        ) => void | Record<string, any> | null | undefined;
        innerBounds?: InnerBoundType | null;
        isDisplayGridGuidelines?: boolean;
        isDisplayInnerSnapDigit?: boolean;
        isDisplayShadowRoundControls?: boolean | "horizontal";
        isDisplaySnapDigit?: boolean;
        keepRatio?: boolean;
        keepRatioFinally?: boolean;
        linePadding?: number;
        maxRoundControls?: number[];
        maxSnapElementGapDistance?: number;
        maxSnapElementGuidelineDistance?: number;
        minRoundControls?: number[];
        onBeforeRender?: (e: OnBeforeRender) => any;
        onBeforeRenderEnd?: (e: OnBeforeRenderEnd) => any;
        onBeforeRenderGroup?: (e: OnBeforeRenderGroup) => any;
        onBeforeRenderGroupEnd?: (e: OnBeforeRenderGroupEnd) => any;
        onBeforeRenderGroupStart?: (e: OnBeforeRenderGroupStart) => any;
        onBeforeRenderStart?: (e: OnBeforeRenderStart) => any;
        onBeforeResize?: (e: OnBeforeResize) => any;
        onBeforeResizeGroup?: (e: OnBeforeResizeGroup) => any;
        onBeforeRotate?: (e: OnBeforeRotate) => any;
        onBeforeRotateGroup?: (e: OnBeforeRotateGroup) => any;
        onBeforeScale?: (e: OnBeforeScale) => any;
        onBeforeScaleGroup?: (e: OnBeforeScaleGroup) => any;
        onBound?: (e: OnBound) => any;
        onChangeTargets?: (e: OnChangeTargets) => void;
        onClick?: (e: OnClick) => any;
        onClickGroup?: (e: OnClickGroup) => any;
        onClip?: (e: OnClip) => any;
        onClipEnd?: (e: OnClipEnd) => any;
        onClipStart?: (e: OnClipStart) => any;
        onDrag?: (e: OnDrag) => any;
        onDragEnd?: (e: OnDragEnd) => any;
        onDragGroup?: (e: OnDragGroup) => any;
        onDragGroupEnd?: (e: OnDragGroupEnd) => any;
        onDragGroupStart?: (e: OnDragGroupStart) => any;
        onDragOrigin?: (e: OnDragOrigin) => any;
        onDragOriginEnd?: (e: OnDragOriginEnd) => any;
        onDragOriginStart?: (e: OnDragOriginStart) => any;
        onDragStart?: (e: OnDragStart) => any;
        onPinch?: (e: OnPinch) => any;
        onPinchEnd?: (e: OnPinchEnd) => any;
        onPinchGroup?: (e: OnPinchGroup) => any;
        onPinchGroupEnd?: (e: OnPinchGroupEnd) => any;
        onPinchGroupStart?: (e: OnPinchGroupStart) => any;
        onPinchStart?: (e: OnPinchStart) => any;
        onRender?: (e: OnRender) => any;
        onRenderEnd?: (e: OnRenderEnd) => any;
        onRenderGroup?: (e: OnRenderGroup) => any;
        onRenderGroupEnd?: (e: OnRenderGroupEnd) => any;
        onRenderGroupStart?: (e: OnRenderGroupStart) => any;
        onRenderStart?: (e: OnRenderStart) => any;
        onResize?: (e: OnResize) => any;
        onResizeEnd?: (e: OnResizeEnd) => any;
        onResizeGroup?: (e: OnResizeGroup) => any;
        onResizeGroupEnd?: (e: OnResizeGroupEnd) => any;
        onResizeGroupStart?: (e: OnResizeGroupStart) => any;
        onResizeStart?: (e: OnResizeStart) => any;
        onRotate?: (e: OnRotate) => any;
        onRotateEnd?: (e: OnRotateEnd) => any;
        onRotateGroup?: (e: OnRotateGroup) => any;
        onRotateGroupEnd?: (e: OnRotateGroupEnd) => any;
        onRotateGroupStart?: (e: OnRotateGroupStart) => any;
        onRotateStart?: (e: OnRotateStart) => any;
        onRound?: (e: OnRound) => any;
        onRoundEnd?: (e: OnRoundEnd) => any;
        onRoundGroup?: (e: OnRoundGroup) => any;
        onRoundGroupEnd?: (e: OnRoundGroupEnd) => any;
        onRoundGroupStart?: (e: OnRoundGroupStart) => any;
        onRoundStart?: (e: OnRoundStart) => any;
        onScale?: (e: OnScale) => any;
        onScaleEnd?: (e: OnScaleEnd) => any;
        onScaleGroup?: (e: OnScaleGroup) => any;
        onScaleGroupEnd?: (e: OnScaleGroupEnd) => any;
        onScaleGroupStart?: (e: OnScaleGroupStart) => any;
        onScaleStart?: (e: OnScaleStart) => any;
        onScroll?: (e: OnScroll) => any;
        onScrollGroup?: (e: OnScrollGroup) => any;
        onSnap?: (e: OnSnap) => any;
        onWarp?: (e: OnWarp) => any;
        onWarpEnd?: (e: OnWarpEnd) => any;
        onWarpStart?: (e: OnWarpStart) => any;
        origin?: boolean;
        originDraggable?: boolean;
        originRelative?: boolean;
        padding?: number | PaddingBox;
        passDragArea?: boolean;
        persistData?: PersistRectData | null;
        pinchable?: boolean | ("rotatable" | "resizable" | "scalable")[];
        pinchOutside?: boolean;
        pinchThreshold?: number;
        preventClickDefault?: boolean;
        preventClickEventOnDrag?: boolean;
        preventDefault?: boolean;
        preventRightClick?: boolean;
        preventWheelClick?: boolean;
        props?: Record<string, any>;
        renderDirections?: boolean | string[];
        resizable?: boolean | ResizableOptions;
        resizeFormat?: (size: number[]) => number[];
        resolveAblesWithRotatable?: Record<string, LineDirection[]> | null;
        rootContainer?: MoveableRefType<HTMLElement>;
        rotatable?: boolean | RotatableOptions;
        rotateAroundControls?: boolean;
        rotationPosition?: RotationPosition | RotationPosition[];
        rotationTarget?:
            | false
            | MoveableRefType<SVGElement | HTMLElement>
            | ArrayFormat<MoveableRefType<SVGElement | HTMLElement>>;
        roundable?: boolean;
        roundClickable?: boolean | "control" | "line";
        roundPadding?: number;
        roundRelative?: boolean;
        scalable?: boolean | ScalableOptions;
        scrollable?: boolean;
        scrollContainer?: MoveableRefType<HTMLElement>;
        scrollOptions?: Partial<DragScrollOptions> | null;
        scrollThreshold?: number;
        scrollThrottleTime?: number;
        snapContainer?: MoveableRefType<SVGElement | HTMLElement>;
        snapDigit?: number;
        snapDirections?: boolean | SnapDirections;
        snapDistFormat?: (
            distance: number,
            type: "horizontal" | "vertical",
        ) => string | number;
        snapGap?: boolean;
        snapGridAll?: boolean;
        snapGridHeight?: number;
        snapGridWidth?: number;
        snapHorizontalThreshold?: number;
        snappable?: boolean | string[];
        snapRenderThreshold?: number;
        snapRotationDegrees?: number[];
        snapRotationThreshold?: number;
        snapThreshold?: number;
        snapVerticalThreshold?: number;
        startDragRotate?: number;
        stopPropagation?: boolean;
        svgOrigin?: string;
        target?: MoveableRefTargetType;
        targetGroups?: MoveableTargetGroupsType;
        throttleDrag?: number;
        throttleDragRotate?: number;
        throttleResize?: number;
        throttleRotate?: number;
        throttleScale?: number;
        transformOrigin?: string | (string | number)[];
        translateZ?: string | number;
        triggerAblesSimultaneously?: boolean;
        useAccuratePosition?: boolean;
        useDefaultGroupRotate?: boolean;
        useMutationObserver?: boolean;
        useResizeObserver?: boolean;
        verticalGuidelines?: (string | number | PosGuideline)[];
        viewContainer?: MoveableRefType<HTMLElement>;
        warpable?: boolean;
        zoom?: number;
    }

    Hierarchy (View Summary)

    Index
    ables? bounds? checkInput? checkResizableError? className? clickable? clipArea? clipHorizontalGuidelines? clippable? clipRelative? clipSnapThreshold? clipTargetBounds? clipVerticalGuidelines? container? controlPadding? cspNonce? customClipPath? defaultClipPath? defaultGroupOrigin? defaultGroupRotate? displayAroundControls? dragArea? dragContainer? dragFocusedInput? draggable? dragTarget? dragTargetSelf? dragWithClip? edge? edgeDraggable? elementGuidelines? elementSnapDirections? flushSync? getScrollPosition? groupableProps? hideChildMoveableDefaultLines? hideDefaultLines? hideThrottleDragRotateLine? horizontalGuidelines? individualGroupable? individualGroupableProps? innerBounds? isDisplayGridGuidelines? isDisplayInnerSnapDigit? isDisplayShadowRoundControls? isDisplaySnapDigit? keepRatio? keepRatioFinally? linePadding? maxRoundControls? maxSnapElementGapDistance? maxSnapElementGuidelineDistance? minRoundControls? onBeforeRender? onBeforeRenderEnd? onBeforeRenderGroup? onBeforeRenderGroupEnd? onBeforeRenderGroupStart? onBeforeRenderStart? onBeforeResize? onBeforeResizeGroup? onBeforeRotate? onBeforeRotateGroup? onBeforeScale? onBeforeScaleGroup? onBound? onChangeTargets? onClick? onClickGroup? onClip? onClipEnd? onClipStart? onDrag? onDragEnd? onDragGroup? onDragGroupEnd? onDragGroupStart? onDragOrigin? onDragOriginEnd? onDragOriginStart? onDragStart? onPinch? onPinchEnd? onPinchGroup? onPinchGroupEnd? onPinchGroupStart? onPinchStart? onRender? onRenderEnd? onRenderGroup? onRenderGroupEnd? onRenderGroupStart? onRenderStart? onResize? onResizeEnd? onResizeGroup? onResizeGroupEnd? onResizeGroupStart? onResizeStart? onRotate? onRotateEnd? onRotateGroup? onRotateGroupEnd? onRotateGroupStart? onRotateStart? onRound? onRoundEnd? onRoundGroup? onRoundGroupEnd? onRoundGroupStart? onRoundStart? onScale? onScaleEnd? onScaleGroup? onScaleGroupEnd? onScaleGroupStart? onScaleStart? onScroll? onScrollGroup? onSnap? onWarp? onWarpEnd? onWarpStart? origin? originDraggable? originRelative? padding? passDragArea? persistData? pinchable? pinchOutside? pinchThreshold? preventClickDefault? preventClickEventOnDrag? preventDefault? preventRightClick? preventWheelClick? props? renderDirections? resizable? resizeFormat? resolveAblesWithRotatable? rootContainer? rotatable? rotateAroundControls? rotationPosition? rotationTarget? roundable? roundClickable? roundPadding? roundRelative? scalable? scrollable? scrollContainer? scrollOptions? scrollThreshold? scrollThrottleTime? snapContainer? snapDigit? snapDirections? snapDistFormat? snapGap? snapGridAll? snapGridHeight? snapGridWidth? snapHorizontalThreshold? snappable? snapRenderThreshold? snapRotationDegrees? snapRotationThreshold? snapThreshold? snapVerticalThreshold? startDragRotate? stopPropagation? svgOrigin? target? targetGroups? throttleDrag? throttleDragRotate? throttleResize? throttleRotate? throttleScale? transformOrigin? translateZ? triggerAblesSimultaneously? useAccuratePosition? useDefaultGroupRotate? useMutationObserver? useResizeObserver? verticalGuidelines? viewContainer? warpable? zoom?
    ables?: Able<IObject<any>, IObject<any>>[]

    You can add your custom able.

    []
    
    bounds?: BoundType | null

    You can set up boundaries.

    null
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.bounds = { left: 0, right: 1000, top: 0, bottom: 1000};
    checkInput?: boolean

    Checks whether this is an element to input text or contentEditable, and prevents dragging.

    false
    
    checkResizableError?: boolean

    Whether to recalculate when the size to be calculated is different from the actual size

    true
    
    className?: string

    You can specify the className of the moveable controlbox.

    ""
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    className: "",
    });

    moveable.className = "moveable1";
    clickable?: boolean

    Whether to trigger the moveable's click event.

    true
    
    clipArea?: boolean

    You can drag the clip by setting clipArea.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    clipHorizontalGuidelines?: (string | number)[]

    Add clip guidelines in the horizontal direction.

    []
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    clipVerticalGuidelines: [0, 100, 200],
    clipHorizontalGuidelines: [0, 100, 200],
    clipSnapThreshold: 5,
    });
    clippable?: boolean | ClippableOptions

    Whether to clip the target.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    clipRelative?: boolean

    % Can be used instead of the absolute px (rect not possible)

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    clipSnapThreshold?: number

    Distance value that can snap to clip guidelines.

    5
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    clipVerticalGuidelines: [0, 100, 200],
    clipHorizontalGuidelines: [0, 100, 200],
    clipSnapThreshold: 5,
    });
    clipTargetBounds?: boolean

    Whether the clip is bound to the target.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    clipTargetBounds: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    clipVerticalGuidelines?: (string | number)[]

    Add clip guidelines in the vertical direction.

    []
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    clipVerticalGuidelines: [0, 100, 200],
    clipHorizontalGuidelines: [0, 100, 200],
    clipSnapThreshold: 5,
    });
    container?: SVGElement | HTMLElement | null

    A container into which Moveables are inserted. Set it only when used within the slot of Web Components or when the container is different.

    parentElement
    
    controlPadding?: number

    By 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

    0
    
    cspNonce?: string

    add nonce property to style for CSP.

    ""
    
    customClipPath?: string

    You can force the custom clipPath. (defaultClipPath < style < customClipPath < dragging clipPath)

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    defaultClipPath?: string

    If clippath is not set, the default value can be set. (defaultClipPath < style < customClipPath < dragging clipPath)

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    defaultGroupOrigin?: string

    Sets the initial transform origin of the group.

    "50% 50%"
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    defaultGroupOrigin: "50% 50%",
    });

    moveable.defaultGroupOrigin = "20% 40%";
    defaultGroupRotate?: number

    Sets the initial rotation of the group.

    0
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    defaultGroupRotate: 0,
    });

    moveable.defaultGroupRotate = 40;
    displayAroundControls?: boolean

    You 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

    false
    
    dragArea?: boolean

    Instead of firing an event on the target, we add it to the moveable control element. You can use click and clickGroup events. Add an event to the moveable area instead of the target for stopPropagation.

    if group, true, else fals
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    dragArea: false,
    });
    dragContainer?: Window | MoveableRefType<HTMLElement>

    Container area where drag works

    window
    
    dragFocusedInput?: boolean

    Whether to drag the focused input If checkInput is true, this option is not applied.

    0.47.0

    false
    
    draggable?: boolean

    Whether or not target can be dragged.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.draggable = true;
    dragTarget?: MoveableRefType<SVGElement | HTMLElement>

    The external target(s) to drag Moveable target(s)

    target
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);
    moveable.target = document.querySelector(".target");
    moveable.dragTarget = document.querySelector(".dragTarget");
    dragTargetSelf?: boolean

    If dragTarget is set directly, taget itself cannot be dragged. Whether to drag the target as well.

    false
    
    dragWithClip?: boolean

    When dragging the target, the clip also moves.

    true
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    edge?: boolean | LineDirection[]

    Whether to scale and resize through edge lines. You can use "n", "w", "s", "e" in LineDirection array.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);
    moveable.edge = true;
    edgeDraggable?: boolean | LineDirection[]

    Whether to move by dragging the edge line

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    draggable: true,
    edgeDraggable: false,
    });

    moveable.edgeDraggable = true;
    elementGuidelines?: (ElementGuidelineValueOption | MoveableRefType<Element>)[]

    Add guidelines for the element.

    []
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.elementGuidelines = [
    document.querySelector(".element"),
    ];
    elementSnapDirections?: boolean | SnapDirections

    You can specify the snap directions of elements.

    true (true is all directions)
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    snappable: true,
    elementSnapDirections: true,
    });
    // snap center
    moveable.elementSnapDirections = { left: true, top: true, right: true, bottom: true, center: true, middle: true };
    flushSync?: (callback: () => void) => void

    If you are using React 18's concurrent mode, use flushSync for UI sync.

    empty function
    
    import { flushSync } from "react-dom";

    <Moveable flushSync={flushSync} />
    getScrollPosition?: (
        e: { direction: number[]; scrollContainer: HTMLElement },
    ) => number[]

    Sets a function to get the scroll position.

    scrollContainer's scrollTop, scrollLeft
    
    groupableProps?: Record<string, any>

    Props that work when group

    {
    roundable: true,
    groupableProps: {
    roundable: false,
    },
    }
    hideChildMoveableDefaultLines?: boolean

    Whether to hide the line in child moveable for group corresponding to the rect of the target.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    hideChildMoveableDefaultLines: false,
    });

    moveable.hideChildMoveableDefaultLines = true;
    hideDefaultLines?: boolean

    Whether to hide the line corresponding to the rect of the target.

    false
    
    hideThrottleDragRotateLine?: boolean

    Hides the guidelines that appear when using the throttleDragRotate prop.

    false
    
    horizontalGuidelines?: (string | number | PosGuideline)[]

    Add guidelines in the horizontal direction.

    []
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.horizontalGuidelines = [100, 200, 500];
    individualGroupable?: boolean

    Create targets individually, not as a group.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    individualGroupable: true,
    });
    individualGroupableProps?: (
        element: SVGElement | HTMLElement | null | undefined,
        index: number,
    ) => void | Record<string, any> | null | undefined

    When using individualGroupable you can pass props to child moveable.

    0.44.0

    innerBounds?: InnerBoundType | null

    You can set up inner boundaries.

    null
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.innerBounds = { left: 500, top: 500, width: 100, height: 100};
    isDisplayGridGuidelines?: boolean

    Whether to show guideline of snap by grid

    false
    
    isDisplayInnerSnapDigit?: boolean

    Whether to show element inner snap distance

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.isDisplayInnerSnapDigit = true;
    isDisplayShadowRoundControls?: boolean | "horizontal"

    Whether to show a round control that does not actually exist as a shadow

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    isDisplayShadowRoundControls: false,
    });
    moveable.isDisplayShadowRoundControls = true;
    isDisplaySnapDigit?: boolean

    Whether to show snap distance.

    true
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.isDisplaySnapDigit = true;
    keepRatio?: boolean

    When resize or scale, keeps a ratio of the width, height.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    scalable: true,
    });

    moveable.keepRatio = true;
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    resizable: true,
    });

    moveable.keepRatio = true;
    keepRatioFinally?: boolean

    The size can be changed by format and throttle, but the ratio is maintained at the end. Forced true when using groups.

    false
    
    linePadding?: number

    By adding padding to the line, you can increase the area of the line that can be clicked and dragged.

    0.43.0

    0
    
    maxRoundControls?: number[]

    Maximum number of round controls. It moves in proportion by control. [horizontal, vertical]

    [4, 4]
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    maxRoundControls: [4, 4],
    });
    moveable.maxRoundControls = [1, 0];
    maxSnapElementGapDistance?: number

    Maximum distance to which element gap guidelines can be snapped.

    Infinity
    
    maxSnapElementGuidelineDistance?: number

    Maximum distance to which element guidelines can be snapped.

    Infinity
    
    minRoundControls?: number[]

    Minimum number of round controls. It moves in proportion by control. [horizontal, vertical]

    [0, 0]
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    minRoundControls: [0, 0],
    });
    moveable.minRoundControls = [1, 0];
    onBeforeRender?: (e: OnBeforeRender) => any

    beforeRender event occurs before the dragging of all events.

    onBeforeRenderEnd?: (e: OnBeforeRenderEnd) => any

    beforeRenderEnd event occurs before the end of all events.

    onBeforeRenderGroup?: (e: OnBeforeRenderGroup) => any

    beforeRenderGroup event occurs before the dragging of all events in group.

    onBeforeRenderGroupEnd?: (e: OnBeforeRenderGroupEnd) => any

    beforeRenderGroupEnd event occurs before the end of all events in group.

    onBeforeRenderGroupStart?: (e: OnBeforeRenderGroupStart) => any

    beforeRenderGroupStart event occurs before the first start of all events in group.

    onBeforeRenderStart?: (e: OnBeforeRenderStart) => any

    beforeRenderStart event occurs before the first start of all events.

    onBeforeResize?: (e: OnBeforeResize) => any

    When resizing, beforeResize is called before resize occurs. In beforeResize, you can get and set the pre-value before resizing.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { resizable: true });
    moveable.on("beforeResize", ({ setFixedDirection }) => {
    if (shiftKey) {
    setFixedDirection([0, 0]);
    }
    });
    moveable.on("resize", ({ target, width, height, drag }) => {
    target.style.width = `${width}px`;
    target.style.height = `${height}px`;
    target.style.transform = drag.transform;
    });
    onBeforeResizeGroup?: (e: OnBeforeResizeGroup) => any

    When resizing the group, beforeResizeGroup is called before resizeGroup occurs. In beforeResizeGroup, you can get and set the pre-value before resizing.

    onBeforeRotate?: (e: OnBeforeRotate) => any

    When rotating, beforeRotate is called before rotate occurs. In beforeRotate, you can get and set the pre-value before rotating.

    onBeforeRotateGroup?: (e: OnBeforeRotateGroup) => any

    When rotating the group, beforeRotateGroup is called before rotateGroup occurs. In beforeRotateGroup, you can get and set the pre-value before rotating.

    onBeforeScale?: (e: OnBeforeScale) => any

    When scaling, beforeScale is called before scale occurs. In beforeScale, you can get and set the pre-value before scaling.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { scalable: true });
    moveable.on("beforeScale", ({ setFixedDirection }) => {
    if (shiftKey) {
    setFixedDirection([0, 0]);
    }
    });
    moveable.on("scale", ({ target, transform, dist }) => {
    target.style.transform = transform;
    });
    onBeforeScaleGroup?: (e: OnBeforeScaleGroup) => any

    When scaling the group, beforeScaleGroup is called before scaleGroup occurs. In beforeScaleGroup, you can get and set the pre-value before scaling.

    onBound?: (e: OnBound) => any

    When the bounds or inner bounds that the target touches while snapping are changed, the bound event is called.

    onChangeTargets?: (e: OnChangeTargets) => void

    When the targets of Moveable are changed, the changeTargets event is called.

    onClick?: (e: OnClick) => any

    When you click on the element, the click event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: document.querySelector(".target"),
    });
    moveable.on("click", ({ hasTarget, containsTarget, targetIndex }) => {
    // If you click on an element other than the target and not included in the target, index is -1.
    console.log("onClickGroup", target, hasTarget, containsTarget, targetIndex);
    });
    onClickGroup?: (e: OnClickGroup) => any

    When you click on the element inside the group, the clickGroup event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    });
    moveable.on("clickGroup", ({ inputTarget, isTarget, containsTarget, targetIndex }) => {
    // If you click on an element other than the target and not included in the target, index is -1.
    console.log("onClickGroup", inputTarget, isTarget, containsTarget, targetIndex);
    });
    onClip?: (e: OnClip) => any

    When drag the clip area or controls, the clip event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    onClipEnd?: (e: OnClipEnd) => any

    When drag end the clip area or controls, the clipEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    onClipStart?: (e: OnClipStart) => any

    When drag start the clip area or controls, the clipStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    clippable: true,
    defaultClipPath: "inset",
    customClipPath: "",
    clipRelative: false,
    clipArea: false,
    dragWithClip: true,
    });
    moveable.on("clipStart", e => {
    console.log(e);
    }).on("clip", e => {
    if (e.clipType === "rect") {
    e.target.style.clip = e.clipStyle;
    } else {
    e.target.style.clipPath = e.clipStyle;
    }
    }).on("clipEnd", e => {
    console.log(e);
    });
    onDrag?: (e: OnDrag) => any

    When dragging, the drag event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { draggable: true });
    moveable.on("drag", ({ target, transform }) => {
    target.style.transform = transform;
    });
    onDragEnd?: (e: OnDragEnd) => any

    When the drag finishes, the dragEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { draggable: true });
    moveable.on("dragEnd", ({ target, isDrag }) => {
    console.log(target, isDrag);
    });
    onDragGroup?: (e: OnDragGroup) => any

    When the group drag, the dragGroup event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    draggable: true
    });
    moveable.on("dragGroup", ({ targets, events }) => {
    console.log("onDragGroup", targets);
    events.forEach(ev => {
    // drag event
    console.log("onDrag left, top", ev.left, ev.top);
    // ev.target!.style.left = `${ev.left}px`;
    // ev.target!.style.top = `${ev.top}px`;
    console.log("onDrag translate", ev.dist);
    ev.target!.style.transform = ev.transform;)
    });
    });
    onDragGroupEnd?: (e: OnDragGroupEnd) => any

    When the group drag finishes, the dragGroupEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    draggable: true
    });
    moveable.on("dragGroupEnd", ({ targets, isDrag }) => {
    console.log("onDragGroupEnd", targets, isDrag);
    });
    onDragGroupStart?: (e: OnDragGroupStart) => any

    When the group drag starts, the dragGroupStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    draggable: true
    });
    moveable.on("dragGroupStart", ({ targets }) => {
    console.log("onDragGroupStart", targets);
    });
    onDragOrigin?: (e: OnDragOrigin) => any

    When drag the origin, the dragOrigin event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    originDraggable: true,
    });
    let translate = [0, 0];
    moveable.on("dragOriginStart", e => {
    e.dragStart && e.dragStart.set(translate);
    }).on("dragOrigin", e => {
    translate = e.drag.beforeTranslate;
    e.target.style.cssText
    = `transform-origin: ${e.transformOrigin};`
    + `transform: translate(${translate[0]}px, ${translate[1]}px)`;
    }).on("dragOriginEnd", e => {
    console.log(e);
    });
    onDragOriginEnd?: (e: OnDragOriginEnd) => any

    When drag end the origin, the dragOriginEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    originDraggable: true,
    });
    let translate = [0, 0];
    moveable.on("dragOriginStart", e => {
    e.dragStart && e.dragStart.set(translate);
    }).on("dragOrigin", e => {
    translate = e.drag.beforeTranslate;
    e.target.style.cssText
    = `transform-origin: ${e.transformOrigin};`
    + `transform: translate(${translate[0]}px, ${translate[1]}px)`;
    }).on("dragOriginEnd", e => {
    console.log(e);
    });
    onDragOriginStart?: (e: OnDragOriginStart) => any

    When drag start the origin, the dragOriginStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    originDraggable: true,
    });
    let translate = [0, 0];
    moveable.on("dragOriginStart", e => {
    e.dragStart && e.dragStart.set(translate);
    }).on("dragOrigin", e => {
    translate = e.drag.beforeTranslate;
    e.target.style.cssText
    = `transform-origin: ${e.transformOrigin};`
    + `transform: translate(${translate[0]}px, ${translate[1]}px)`;
    }).on("dragOriginEnd", e => {
    console.log(e);
    });
    onDragStart?: (e: OnDragStart) => any

    When the drag starts, the dragStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { draggable: true });
    moveable.on("dragStart", ({ target }) => {
    console.log(target);
    });
    onPinch?: (e: OnPinch) => any

    When pinching, the pinch event is called with part of scale, rotate, resize

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    rotatable: true,
    scalable: true,
    pinchable: true, // ["rotatable", "scalable"]
    });
    moveable.on("pinch", ({ target }) => {
    console.log(target);
    });
    moveable.on("rotate", ({ target }) => {
    console.log(target);
    });
    moveable.on("scale", ({ target }) => {
    console.log(target);
    });
    onPinchEnd?: (e: OnPinchEnd) => any

    When the pinch finishes, the pinchEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    rotatable: true,
    scalable: true,
    pinchable: true, // ["rotatable", "scalable"]
    });
    moveable.on("pinchEnd", ({ target }) => {
    console.log(target);
    });
    moveable.on("rotateEnd", ({ target }) => {
    console.log(target);
    });
    moveable.on("scaleEnd", ({ target }) => {
    console.log(target);
    });
    onPinchGroup?: (e: OnPinchGroup) => any

    When the group pinch, the pinchGroup event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    pinchable: true
    });
    moveable.on("pinchGroup", ({ targets, events }) => {
    console.log("onPinchGroup", targets);
    });
    onPinchGroupEnd?: (e: OnPinchGroupEnd) => any

    When the group pinch finishes, the pinchGroupEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    pinchable: true
    });
    moveable.on("pinchGroupEnd", ({ targets, isDrag }) => {
    console.log("onPinchGroupEnd", targets, isDrag);
    });
    onPinchGroupStart?: (e: OnPinchGroupStart) => any

    When the group pinch starts, the pinchGroupStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    pinchable: true
    });
    moveable.on("pinchGroupStart", ({ targets }) => {
    console.log("onPinchGroupStart", targets);
    });
    onPinchStart?: (e: OnPinchStart) => any

    When the pinch starts, the pinchStart event is called with part of scaleStart, rotateStart, resizeStart

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    rotatable: true,
    scalable: true,
    pinchable: true, // ["rotatable", "scalable"]
    });
    moveable.on("pinchStart", ({ target }) => {
    console.log(target);
    });
    moveable.on("rotateStart", ({ target }) => {
    console.log(target);
    });
    moveable.on("scaleStart", ({ target }) => {
    console.log(target);
    });
    onRender?: (e: OnRender) => any

    render event occurs before the target is drawn on the screen.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: document.querySelector(".target"),
    });
    moveable.on("render", ({ target }) => {
    console.log("onRender", target);
    });
    onRenderEnd?: (e: OnRenderEnd) => any

    renderEnd event occurs at the end of all events.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: document.querySelector(".target"),
    });
    moveable.on("renderEnd", ({ target }) => {
    console.log("onRenderEnd", target);
    });
    onRenderGroup?: (e: OnRenderGroup) => any

    renderGroup event occurs before the target is drawn on the screen in group.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    });
    moveable.on("renderGroup", ({ targets }) => {
    console.log("onRenderGroup", targets);
    });
    onRenderGroupEnd?: (e: OnRenderGroupEnd) => any

    renderGroupEnd event occurs at the end of all events in group.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    });
    moveable.on("renderGroupEnd", ({ targets }) => {
    console.log("onRenderGroupEnd", targets);
    });
    onRenderGroupStart?: (e: OnRenderGroupStart) => any

    renderGroupStart event occurs at the first start of all events in group.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    });
    moveable.on("renderGroupStart", ({ targets }) => {
    console.log("onRenderGroupStart", targets);
    });
    onRenderStart?: (e: OnRenderStart) => any

    renderStart event occurs at the first start of all events.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: document.querySelector(".target"),
    });
    moveable.on("renderStart", ({ target }) => {
    console.log("onRenderStart", target);
    });
    onResize?: (e: OnResize) => any

    When resizing, the resize event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { resizable: true });
    moveable.on("resize", ({ target, width, height }) => {
    target.style.width = `${e.width}px`;
    target.style.height = `${e.height}px`;
    });
    onResizeEnd?: (e: OnResizeEnd) => any

    When the resize finishes, the resizeEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { resizable: true });
    moveable.on("resizeEnd", ({ target, isDrag }) => {
    console.log(target, isDrag);
    });
    onResizeGroup?: (e: OnResizeGroup) => any

    When the group resize, the resizeGroup event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    resizable: true
    });
    moveable.on("resizeGroup", ({ targets, events }) => {
    console.log("onResizeGroup", targets);
    events.forEach(ev => {
    const offset = [
    direction[0] < 0 ? -ev.delta[0] : 0,
    direction[1] < 0 ? -ev.delta[1] : 0,
    ];
    // ev.drag is a drag event that occurs when the group resize.
    const left = offset[0] + ev.drag.beforeDist[0];
    const top = offset[1] + ev.drag.beforeDist[1];
    const width = ev.width;
    const top = ev.top;
    });
    });
    onResizeGroupEnd?: (e: OnResizeGroupEnd) => any

    When the group resize finishes, the resizeGroupEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    resizable: true
    });
    moveable.on("resizeGroupEnd", ({ targets, isDrag }) => {
    console.log("onResizeGroupEnd", targets, isDrag);
    });
    onResizeGroupStart?: (e: OnResizeGroupStart) => any

    When the group resize starts, the resizeGroupStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    resizable: true
    });
    moveable.on("resizeGroupStart", ({ targets }) => {
    console.log("onResizeGroupStart", targets);
    });
    onResizeStart?: (e: OnResizeStart) => any

    When the resize starts, the resizeStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { resizable: true });
    moveable.on("resizeStart", ({ target }) => {
    console.log(target);
    });
    onRotate?: (e: OnRotate) => any

    When rotating, the rotate event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { rotatable: true });
    moveable.on("rotate", ({ target, transform, dist }) => {
    target.style.transform = transform;
    });
    onRotateEnd?: (e: OnRotateEnd) => any

    When the rotate finishes, the rotateEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { rotatable: true });
    moveable.on("rotateEnd", ({ target, isDrag }) => {
    console.log(target, isDrag);
    });
    onRotateGroup?: (e: OnRotateGroup) => any

    When the group rotate, the rotateGroup event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    rotatable: true
    });
    moveable.on("rotateGroup", ({ targets, events }) => {
    console.log("onRotateGroup", targets);
    events.forEach(ev => {
    const target = ev.target;
    // ev.drag is a drag event that occurs when the group rotate.
    const left = ev.drag.beforeDist[0];
    const top = ev.drag.beforeDist[1];
    const deg = ev.beforeDist;
    });
    });
    onRotateGroupEnd?: (e: OnRotateGroupEnd) => any

    When the group rotate finishes, the rotateGroupEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    rotatable: true
    });
    moveable.on("rotateGroupEnd", ({ targets, isDrag }) => {
    console.log("onRotateGroupEnd", targets, isDrag);
    });
    onRotateGroupStart?: (e: OnRotateGroupStart) => any

    When the group rotate starts, the rotateGroupStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    rotatable: true
    });
    moveable.on("rotateGroupStart", ({ targets }) => {
    console.log("onRotateGroupStart", targets);
    });
    onRotateStart?: (e: OnRotateStart) => any

    When the rotate starts, the rotateStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { rotatable: true });
    moveable.on("rotateStart", ({ target }) => {
    console.log(target);
    });
    onRound?: (e: OnRound) => any

    When drag or double click the border area or controls, the round event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    });
    moveable.on("roundStart", e => {
    console.log(e);
    }).on("round", e => {
    e.target.style.borderRadius = e.borderRadius;
    }).on("roundEnd", e => {
    console.log(e);
    });
    onRoundEnd?: (e: OnRoundEnd) => any

    When drag end the border area or controls, the roundEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    });
    moveable.on("roundStart", e => {
    console.log(e);
    }).on("round", e => {
    e.target.style.borderRadius = e.borderRadius;
    }).on("roundEnd", e => {
    console.log(e);
    });
    onRoundGroup?: (e: OnRoundGroup) => any

    When drag or double click the border area or controls, the roundGroup event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    targets: [target1, target2, target3],
    roundable: true,
    });
    moveable.on("roundGroupStart", e => {
    console.log(e.targets);
    }).on("roundGroup", e => {
    e.events.forEach(ev => {
    ev.target.style.cssText += ev.cssText;
    });
    }).on("roundGroupEnd", e => {
    console.log(e);
    });
    onRoundGroupEnd?: (e: OnRoundGroupEnd) => any

    When drag end the border area or controls, the roundGroupEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    targets: [target1, target2, target3],
    roundable: true,
    });
    moveable.on("roundGroupStart", e => {
    console.log(e.targets);
    }).on("roundGroup", e => {
    e.events.forEach(ev => {
    ev.target.style.cssText += ev.cssText;
    });
    }).on("roundGroupEnd", e => {
    console.log(e);
    });
    onRoundGroupStart?: (e: OnRoundGroupStart) => any

    When drag start the clip area or controls, the roundGroupStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    targets: [target1, target2, target3],
    roundable: true,
    });
    moveable.on("roundGroupStart", e => {
    console.log(e.targets);
    }).on("roundGroup", e => {
    e.events.forEach(ev => {
    ev.target.style.cssText += ev.cssText;
    });
    }).on("roundGroupEnd", e => {
    console.log(e);
    });
    onRoundStart?: (e: OnRoundStart) => any

    When drag start the clip area or controls, the roundStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    });
    moveable.on("roundStart", e => {
    console.log(e);
    }).on("round", e => {
    e.target.style.borderRadius = e.borderRadius;
    }).on("roundEnd", e => {
    console.log(e);
    });
    onScale?: (e: OnScale) => any

    When scaling, the scale event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { scalable: true });
    moveable.on("scale", ({ target, transform, dist }) => {
    target.style.transform = transform;
    });
    onScaleEnd?: (e: OnScaleEnd) => any

    When the scale finishes, the scaleEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { scalable: true });
    moveable.on("scaleEnd", ({ target, isDrag }) => {
    console.log(target, isDrag);
    });
    onScaleGroup?: (e: OnScaleGroup) => any

    When the group scale, the scaleGroup event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    scalable: true
    });
    moveable.on("scaleGroup", ({ targets, events }) => {
    console.log("onScaleGroup", targets);
    events.forEach(ev => {
    const target = ev.target;
    // ev.drag is a drag event that occurs when the group scale.
    const left = ev.drag.beforeDist[0];
    const top = ev.drag.beforeDist[1];
    const scaleX = ev.scale[0];
    const scaleY = ev.scale[1];
    });
    });
    onScaleGroupEnd?: (e: OnScaleGroupEnd) => any

    When the group scale finishes, the scaleGroupEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    scalable: true
    });
    moveable.on("scaleGroupEnd", ({ targets, isDrag }) => {
    console.log("onScaleGroupEnd", targets, isDrag);
    });
    onScaleGroupStart?: (e: OnScaleGroupStart) => any

    When the group scale starts, the scaleGroupStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    scalable: true
    });
    moveable.on("scaleGroupStart", ({ targets }) => {
    console.log("onScaleGroupStart", targets);
    });
    onScaleStart?: (e: OnScaleStart) => any

    When the scale starts, the scaleStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { scalable: true });
    moveable.on("scaleStart", ({ target }) => {
    console.log(target);
    });
    onScroll?: (e: OnScroll) => any

    When the drag cursor leaves the scrollContainer, the scroll event occur to scroll.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: document.querySelector(".target"),
    });
    moveable.on("scroll", ({ scrollContainer, direction }) => {
    scrollContainer.scrollLeft += direction[0] * 10;
    scrollContainer.scrollTop += direction[1] * 10;
    });
    onScrollGroup?: (e: OnScrollGroup) => any

    When the drag cursor leaves the scrollContainer, the scrollGroup event occur to scroll in group.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    });
    moveable.on("scroll", ({ scrollContainer, direction }) => {
    scrollContainer.scrollLeft += direction[0] * 10;
    scrollContainer.scrollTop += direction[1] * 10;
    });
    onSnap?: (e: OnSnap) => any

    When you drag or dragControl, the snap event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    snappable: true
    });
    moveable.on("snap", e => {
    console.log("onSnap", e);
    });
    onWarp?: (e: OnWarp) => any

    When warping, the warp event is called.

    import Moveable from "@moveable-next/vanilla";
    let matrix = [
    1, 0, 0, 0,
    0, 1, 0, 0,
    0, 0, 1, 0,
    0, 0, 0, 1,
    ];
    const moveable = new Moveable(document.body, { warpable: true });
    moveable.on("warp", ({ target, transform, delta, multiply }) => {
    // target.style.transform = transform;
    matrix = multiply(matrix, delta);
    target.style.transform = `matrix3d(${matrix.join(",")})`;
    });
    onWarpEnd?: (e: OnWarpEnd) => any

    When the warp finishes, the warpEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { warpable: true });
    moveable.on("warpEnd", ({ target, isDrag }) => {
    console.log(target, isDrag);
    });
    onWarpStart?: (e: OnWarpStart) => any

    When the warp starts, the warpStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, { warpable: true });
    moveable.on("warpStart", ({ target }) => {
    console.log(target);
    });
    origin?: boolean

    Whether or not the origin control box will be visible or not.

    true
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.origin = true;
    originDraggable?: boolean

    Whether to drag origin.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    originDraggable: true,
    });
    let translate = [0, 0];
    moveable.on("dragOriginStart", e => {
    e.dragStart && e.dragStart.set(translate);
    }).on("dragOrigin", e => {
    translate = e.drag.beforeTranslate;
    e.target.style.cssText
    = `transform-origin: ${e.transformOrigin};`
    + `transform: translate(${translate[0]}px, ${translate[1]}px)`;
    }).on("dragOriginEnd", e => {
    console.log(e);
    });
    originRelative?: boolean

    % Can be used instead of the absolute px.

    true
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    originDraggable: true,
    originRelative: false,
    });
    moveable.originRelative = true;
    padding?: number | PaddingBox

    Add padding around the target to increase the drag area.

    null
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: document.querySelector(".target"),
    padding: { left: 0, top: 0, right: 0, bottom: 0 },
    });
    moveable.padding = { left: 10, top: 10, right: 10, bottom: 10 },
    moveable.updateRect();
    passDragArea?: boolean

    Set pointerEvents: none; css to pass events in dragArea.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    dragArea: false,
    });
    persistData?: PersistRectData | null

    Data for first render

    null
    
    pinchable?: boolean | ("rotatable" | "resizable" | "scalable")[]

    Whether or not target can be pinched with draggable, resizable, scalable, rotatable.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.pinchable = true;
    pinchOutside?: boolean

    Whether the container containing the target becomes a pinch.

    true
    
    pinchThreshold?: number

    Minimum distance to pinch.

    20
    
    preventClickDefault?: boolean

    Prevent click event on dragStart. (mousedown, touchstart)

    false
    
    preventClickEventOnDrag?: boolean

    Prevent click event on drag. (mousemove, touchmove)

    true
    
    preventDefault?: boolean

    Whether to call preventDefault on touchstart or mousedown

    0.44.0

    true
    
    preventRightClick?: boolean

    Whether to prevent dragging using the right mouse button

    true
    
    preventWheelClick?: boolean

    Whether to prevent dragging using the wheel (middle) mouse button

    true
    
    props?: Record<string, any>

    You can use props in object format or custom props.

    empty object
    
    renderDirections?: boolean | string[]

    Set directions to show the control box.

    false if rotatable, ["n", "nw", "ne", "s", "se", "sw", "e", "w"] otherwise
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    warpable: true,
    renderDirections: ["n", "nw", "ne", "s", "se", "sw", "e", "w"],
    });

    moveable.renderDirections = ["nw", "ne", "sw", "se"];
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    scalable: true,
    renderDirections: ["n", "nw", "ne", "s", "se", "sw", "e", "w"],
    });

    moveable.renderDirections = ["nw", "ne", "sw", "se"];
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    resizable: true,
    renderDirections: ["n", "nw", "ne", "s", "se", "sw", "e", "w"],
    });

    moveable.renderDirections = ["nw", "ne", "sw", "se"];
    resizable?: boolean | ResizableOptions

    Whether or not target can be resized.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    resizable: false,
    });

    moveable.resizable = true;
    resizeFormat?: (size: number[]) => number[]

    Function to convert size for resize.

    oneself
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    resizable: true,
    resizeFormat: v => v,
    });

    moveable.resizeFormat = (size: number[]) => ([Math.trunc(size[0]), Math.trunc(size[1])];
    resolveAblesWithRotatable?: Record<string, LineDirection[]> | null

    Sets the control that will cause resize along with rotate. (Only Single Target, Only resizable, Beta)

    null
    
    rootContainer?: MoveableRefType<HTMLElement>

    Moveable Root Container (No Transformed Container)

    parentElement
    
    rotatable?: boolean | RotatableOptions

    Whether or not target can be rotated.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.rotatable = true;
    rotateAroundControls?: boolean

    You can rotate around direction controls. Either rotateAroundControls or displayAroundControls can be used.

    0
    
    rotationPosition?: RotationPosition | RotationPosition[]

    You can specify the position of the rotation.

    "top"
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    rotationPosition: "top",
    });

    moveable.rotationPosition = "bottom"
    rotationTarget?:
        | false
        | MoveableRefType<SVGElement | HTMLElement>
        | ArrayFormat<MoveableRefType<SVGElement | HTMLElement>>

    Set additional rotationTargets.

    null
    
    roundable?: boolean

    Whether to show and drag or double click border-radius.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    });
    moveable.on("roundStart", e => {
    console.log(e);
    }).on("round", e => {
    e.target.style.borderRadius = e.borderRadius;
    }).on("roundEnd", e => {
    console.log(e);
    });
    roundClickable?: boolean | "control" | "line"

    Whether you can add/delete round controls by double-clicking a line or control.

    true
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    roundClickable: true,
    });
    moveable.roundClickable = false;
    roundPadding?: number

    The padding value of the position of the round control

    0
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundPadding: 0,
    });
    moveable.roundPadding = 15;
    roundRelative?: boolean

    % Can be used instead of the absolute px

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    });
    moveable.on("roundStart", e => {
    console.log(e);
    }).on("round", e => {
    e.target.style.borderRadius = e.borderRadius;
    }).on("roundEnd", e => {
    console.log(e);
    });
    scalable?: boolean | ScalableOptions

    Whether or not target can be scaled.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.scalable = true;
    scrollable?: boolean

    Whether or not target can be scrolled to the scroll container

    false
    
    scrollContainer?: MoveableRefType<HTMLElement>

    The container to which scroll is applied

    container
    
    scrollOptions?: Partial<DragScrollOptions> | null

    Option to scroll with dragging

    0.43.0

    const scrollOptions = {
    container: () => viewer.getContainer(),
    threshold: 20,
    getScrollPosition: () => {
    return [
    viewer.getScrollLeft({ absolute: true }),
    viewer.getScrollTop({ absolute: true }),
    ];
    },
    };
    scrollThreshold?: number

    Expand the range of the scroll check area.

    0
    
    scrollThrottleTime?: number

    Time interval that occurs when scrolling occurs when dragging is maintained If set to 0, it does not occur.

    0
    
    snapContainer?: MoveableRefType<SVGElement | HTMLElement>

    A snap container that is the basis for snap, bounds, and innerBounds.

    null
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.querySelector(".container"));

    moveable.snapContainer = document.body;
    snapDigit?: number

    snap distance digits.

    0
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.snapDigit = 0
    snapDirections?: boolean | SnapDirections

    You can specify the directions to snap to the target.

    true (true is all directions)
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    snappable: true,
    snapDirections: true,
    });
    // snap center
    moveable.snapDirections = { left: true, top: true, right: true, bottom: true, center: true, middle: true };
    snapDistFormat?: (
        distance: number,
        type: "horizontal" | "vertical",
    ) => string | number

    You can set the text format of the distance shown in the guidelines.

    oneself
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    snappable: true,
    snapDistFormat: (v, type) => v,
    });
    moveable.snapDistFormat = (v, type) => `${v}px`;
    snapGap?: boolean

    When you drag, make the gap snap in the element guidelines.

    true
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    snappable: true,
    snapElement: true,
    snapGap: true,
    });

    moveable.snapGap = false;
    snapGridAll?: boolean

    In 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
    
    snapGridHeight?: number

    If height size is greater than 0, you can horizontal snap to the grid.

    0 (0 is not used)
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.snapGridHeight = 5;
    snapGridWidth?: number

    If width size is greater than 0, you can vertical snap to the grid.

    0 (0 is not used)
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.snapGridWidth = 5;
    snapHorizontalThreshold?: number

    Distance horizontal between horizontal value that can snap to guidelines.

    5
    
    snappable?: boolean | string[]

    Whether or not target can be snapped to the guideline.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.snappable = true;
    snapRenderThreshold?: number

    Distance value that render snapped guidelines.

    1
    
    snapRotationDegrees?: number[]

    degree angles to snap to rotation

    []
    
    snapRotationThreshold?: number

    Snap works if abs(current rotation - snapRotationDegrees) < snapRotationThreshold.

    5
    
    snapThreshold?: number

    /**

    • Distance value that can snap to guidelines.
    • Use snapHorizontalThreshold and snapVerticalThreshold
    0
    *
    * import Moveable from "@moveable-next/vanilla";
    *
    * const moveable = new Moveable(document.body);
    *
    * moveable.snapThreshold = 5;
    snapVerticalThreshold?: number

    Distance Horizontal value that can snap to guidelines.

    5
    
    startDragRotate?: number

    start angle(degree) of x,y for throttleDragRotate when drag.

    0
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    // 45, 135, 225, 315
    moveable.throttleDragRotate = 90;
    moveable.startDragRotate = 45;
    stopPropagation?: boolean

    Whether to prevent bubbling of events like mousedown, touchstart, etc.

    false
    
    svgOrigin?: string

    Sets 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

    ""
    

    The target to indicate Moveable Control Box.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);
    moveable.target = document.querySelector(".target");

    The nested groups of the targets, made from the nested arrays in target. Moveable sets it itself when it renders a group.

    throttleDrag?: number

    throttle of x, y when drag.

    0
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.throttleDrag = 1;
    throttleDragRotate?: number

    throttle of angle(degree) of x,y when drag.

    0
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.throttleDragRotate = 45;
    throttleResize?: number

    throttle of width, height when resize. If throttleResize is set to less than 1, the target may shake.

    1
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    resizable: true,
    throttleResize: 1,
    });

    moveable.throttleResize = 0;
    throttleRotate?: number

    throttle of angle(degree) when rotate.

    0
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.throttleRotate = 1;
    throttleScale?: number

    throttle of scaleX, scaleY when scale.

    0
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.throttleScale = 0.1;
    transformOrigin?: string | (string | number)[]

    The default transformOrigin of the target can be set in advance.

    ""
    
    translateZ?: string | number

    You can set the translateZ value of moveable.

    50
    
    triggerAblesSimultaneously?: boolean

    Lets generate events of ables at the same time. (like Resizable, Scalable)

    false
    
    useAccuratePosition?: boolean

    Whether 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
    
    useDefaultGroupRotate?: boolean

    Use the defaultGroupRotate even if the children's rotations match.

    false
    
    useMutationObserver?: boolean

    Whether the target size, pos in inline style is detected and updated whenever it changes. It is more effective when used together with useResizeObserver.

    false
    
    useResizeObserver?: boolean

    Whether the target size is detected and updated whenever it changes. It is more effective when used together with useMutationObserver.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);
    moveable.useResizeObserver = true;
    verticalGuidelines?: (string | number | PosGuideline)[]

    Add guidelines in the vertical direction.

    []
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.verticalGuidelines = [100, 200, 500];
    viewContainer?: MoveableRefType<HTMLElement>

    If you want to set the dragging information to the viewer, refer to the following.

    null
    
    warpable?: boolean

    Whether or not target can be warped.

    false
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);

    moveable.warpable = true;
    zoom?: number

    Zooms in the elements of a moveable.

    1
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body);
    moveable.zoom = 2;