svelte-cursorphobic
v1.0.1
Published
Create cute animation with cursor reactive elements.
Downloads
16
Readme
Svelte Cursorphobic
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/
Installation
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>
Usage
For detailed documentation and demos check out: https://mitcheljager.github.io/svelte-cursorphobic/
Properties
| 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.