Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

svelte-motion

micha-lmxt31.7kMIT0.12.2TypeScript support: included

Svelte animation library based on the React library framer-motion.

svelte animation, svelte, animation, gestures, drag, spring, popmotion, framer-motion

readme

Svelte Motion

An animation library based on framer-motion.

Visit Project Page

Installation

npm install --save-dev svelte-motion

Usage

Corresponding to a MotionDiv in framer-motion is this:

import { Motion } from 'svelte-motion'

<Motion let:motion><div use:motion/></Motion>

For svg elements like 'g', 'path' or 'circle', use:

<Motion let:motion isSVG><g use:motion/></Motion>