1.0.1 • Published 2 years ago
svelte-cursorphobic v1.0.1
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 --devnpm install cursorphobic --save-devInclude 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. |