import * as React from "react"; import Moveable, { makeAble, MoveableManagerInterface, Renderer } from "@/react-moveable"; const CustomRotation = makeAble("customRotation", { render(moveable: MoveableManagerInterface, React: Renderer): any { const rect = moveable.getRect(); const { pos1, pos2 } = moveable.state; // Add key (required) // Add class prefix moveable-(required) // translateY(-20px) return
; }, }); export default function App() { const targetRef = React.useRef(null); return

Custom Rotatation with rotationTarget

Target
{ e.target.style.transform = e.transform; }} onResize={e => { e.target.style.width = `${e.width}px`; e.target.style.height = `${e.height}px`; e.target.style.transform = e.drag.transform; }} onRotate={e => { e.target.style.transform = e.drag.transform; }} />
; }