cursor
Specifies custom CSS cursor style properties for the hovered and grabbed states on devices that match the media query '(pointer:fine)'
.
Accepts
Boolean
(false
disable custom styling){ onHover: 'grab', onGrab: 'grabbing' }
- A
Function
that returns an of the above
When defined using a Function
, the value will be automatically refreshed every time the container or target element is resized.
It can also be refreshed manually using the refresh()
method.
Default
{ onHover: 'grab', onGrab: 'grabbing' }
cursor code example
import { createDraggable } from 'animejs';
createDraggable('.square', {
cursor: false
});
createDraggable('.circle', {
cursor: {
onHover: 'move',
onGrab: 'wait'
}
});
<div class="large centered row">
<div class="square draggable"></div>
<div class="circle draggable"></div>
</div>