Installation
Install the component
Run the following command to install the component and its dependencies:
npx @motion-core/cli add magneticImport the component
Import the component into your Svelte file:
import { Magnetic } from "$lib/motion-core";import { Magnetic } from "$lib/motion-core";Usage
Props
Magnetic
| Prop | Type | Default |
|---|---|---|
duration | number | 1 |
ease | string | 'elastic.out(1, 0.3)' |
class | string | — |