A (very) lightweight component that makes elements afraid of your cursor. Used to easily create cute animations that react to your mouse.
Demo and Docs: https://mitcheljager.github.io/svelte-cursorphobic/
Install using Yarn or NPM.
yarn add cursorphobic --dev
npm install cursorphobic --save-dev
Include the component in your app.
import Cursorphobic from "svelte-cursorphobic"
<Cursorphobic>...<Cursorphobic>
For detailed documentation and demos check out: https://mitcheljager.github.io/svelte-cursorphobic/
Property | Default | Description |
---|---|---|
range | 200 | Controls from how far away the component starts reacting to your cursor. |
multiplier | 0.1 | Controls how heavily an element reacts to your cursor. |
smoothing | 0.25 | Controls how quickly an element moves relative to changes in your cursor. |