0.0.3 • Published 5 years ago
duckling.js v0.0.3

duckling
JS cursor followe for websites
## How to use
Install the depencencies
yarn add ducklingor
npm install --save ducklingAdd to your project
Import in your project
import {usePointer, helper} from 'duckling';Initialize
const {initialProperties, interactionConfig} = usePointer();Generate the interactions
interactionConfig.set('.nav-item', (elem) => {
const coordinates = elem.getBoundingClientRect();
return {
props: {
pointerSize: helper.px(parseInt(initialProperties.pointerSize) / 2),
pointerX: helper.px(coordinates.left + coordinates.width / 2),
pointerY: helper.px(coordinates.top + coordinates.height + 10),
},
track: false,
};
});interactionConfig is a Map class from js sou you can interact with it with methods like set or delete