ES Drager

Rotation

ES Drager provides built-in rotation functionality that can be enabled with a single prop.

Basic Rotation

Enable rotation by setting the rotatable prop. A rotation handle will appear above the element:

Rotate me!

Drag the rotation handle above the element to rotate it.

Initial Rotation

You can set an initial rotation angle using the rotation prop (in degrees):

45° Rotation

Rotation Events

Track rotation changes using the onRotate event handler:

Check console

Open your browser's console to see the rotation angle being logged.

Combined with Dragging

Rotation works seamlessly with dragging and other features:

Drag & Rotate