Introduction
A production-ready declarative motion library for Svelte.
Motion Start is a declarative animation library for Svelte 5, built as a port of Framer Motion 11.11.11. You describe the state you want an element to be in
and Motion Start works out how to get there — including layout changes, gestures, scroll, and
enter/exit animations.
hover me
rotate
tap me
Every animation above is just a prop:
<script>
import { motion } from "motion-start";
</script>
<motion.div
whileHover={{ scale: 1.12 }}
whileTap={{ scale: 0.92 }}
transition={{ type: "spring", stiffness: 400, damping: 20 }}
/>
Alpha
Motion Start is currently in alpha. APIs may still change and you should expect bugs — please report them or open a PR.
What's new in 0.2
0.2.0-next.0 is a rewrite against framer-motion@11.11.11 (previously 4.0.3) on Svelte 5 runes.
New
Reorder.Group/Reorder.Itemfor drag-to-reorder lists.LayoutGroupand the full projection engine, replacingAnimateSharedLayout.AnimatePresencemode(sync|wait|popLayout) andusePresenceData.- WAAPI-accelerated animations,
animate()sequences, andstagger(). - Scroll (
useScroll), viewport (whileInView) anduseInViewsupport. - Motion value hooks:
useTime,useVelocity,useWillChange,useAnimate,useAnimateMini. - Subpath entries:
motion-start/dom,/mini,/m,/client,/projection.
Changed
- Components and hooks are runes-based; the renderless
Use*.sveltewrappers are gone in favour of plain functions and classes. motionandmare proxies, so any element is available asmotion.<tag>.- Gestures are rewritten onto the shared
Featurepipeline (hover, press, pan, drag, focus).
Removed
AnimateSharedLayout— useLayoutGroupwithlayoutId.MotionDiv— usemotion.div.
Explore
Getting Started
Install Motion Start and write your first animation.
Animation
Props, variants, keyframes and orchestration.
Gestures
Hover, press, pan, drag and viewport.
Layout animations
Animate between any two layouts with a single prop.
Components
motion, AnimatePresence, LayoutGroup, Reorder and more.
Motion values
Track, transform and compose values outside of Svelte state.