1.0.1 • Published 1 year ago

svelte-cursorphobic v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Svelte Cursorphobic

npm version npm downloads bundle size

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

PropertyDefaultDescription
range200Controls from how far away the component starts reacting to your cursor.
multiplier0.1Controls how heavily an element reacts to your cursor.
smoothing0.25Controls how quickly an element moves relative to changes in your cursor.
1.0.1

1 year ago

1.0.0

1 year ago